package a.f.i;

import a.c.ab;
import a.c.bb;
import a.c.*;
import a.c.z;
import a.d.t;
import a.d.u;
import a.d.v;
import a.f.*;
import a.f.c.h;
import a.f.cb;
import a.f.d.a.jc;
import a.f.d.a.kc;
import a.f.d.a.pc;
import a.f.h.j;
import a.f.l.hb;
import a.f.r;
import a.i.p;

import java.awt.geom.Rectangle2D;
import java.util.*;

import a.d.u;
import a.d.t;
import a.d.v;
import a.i.p;

public class a
  extends r
{
  public static final Object g = "y.layout.partial.PartialLayouter.PARTIAL_NODES_DPKEY";
  public static final Object h = "y.layout.partial.PartialLayouter.PARTIAL_EDGES_DPKEY";
  public static final String i = "y.layout.partial.PartialLayouter.ROUTE_EDGE_DPKEY";
  public static final byte j = 0;
  public static final byte k = 1;
  public static final byte l = 2;
  public static final byte m = 3;
  public static final byte n = 4;
  public static final Object o = "y.layout.PartialLayouter.COMPONENT_ASSIGNMENT_DPKEY";
  public static final byte p = 0;
  public static final byte q = 1;
  public static final byte r = 2;
  public static final byte s = 3;
  public static final byte t = 2;
  public static final byte u = 3;
  public static final byte v = 0;
  public static final byte w = 2;
  public static final byte x = 1;
  public static final byte y = 3;
  public static final byte z = 5;
  public static final byte A = -1;
  private static final double B = 0.001D;
  private static final double C = 0.5D;
  private rc D = null;
  private bb E;
  private bb F;
  private ab G;
  private ab H;
  private bb[] I;
  private a.c.x J;
  private a.c.x K;
  private boolean L;
  private bb M;
  private long N;
  private byte O;
  private byte P = 0;
  private byte Q = 2;
  private byte R = -1;
  static final String S = "remain";
  static final String T = "component";
  private a.c.x U;
  private Map V;
  private Map W;
  private a.c.x X;
  private Map Y;
  private Map Z;
  private Map ab;
  private Map bb;
  private a.c.x cb = db.a();
  private h db;
  private a.c.e eb;
  private b fb = new b();
  private boolean gb = false;
  private boolean hb;
  private double ib = this.jb + 5;
  private int jb = 15;
  private rc kb;
  private boolean lb;
  private a.d.w mb;
  private boolean nb = false;
  private boolean ob = false;
  private long pb = 2147483647L;
  private boolean qb = true;
  private boolean rb;
  private e sb;
  private static final u tb = new u(0.0D, 0.0D, 0.0D, 0.0D);
  static final double ub = 500.0D;
  public static boolean vb;
  public static boolean wb;
  
  public a()
  {
    c((byte)1);
  }
  
  public a(rc paramrc)
  {
    this();
    this.D = paramrc;
  }
  
  public void a(rc paramrc)
  {
    this.D = paramrc;
  }
  
  public rc a()
  {
    return this.D;
  }
  
  public long b()
  {
    return this.pb;
  }
  
  public void a(long paramLong)
  {
    this.pb = paramLong;
  }
  
  public boolean c()
  {
    return this.rb;
  }
  
  public void a(boolean paramBoolean)
  {
    this.rb = paramBoolean;
  }
  
  public boolean d()
  {
    return this.qb;
  }
  
  public void b(boolean paramBoolean)
  {
    this.qb = paramBoolean;
  }
  
  public boolean e()
  {
    return this.L;
  }
  
  public void c(boolean paramBoolean)
  {
    this.L = paramBoolean;
  }
  
  public byte f()
  {
    return this.Q;
  }
  
  public void a(byte paramByte)
  {
    this.Q = paramByte;
  }
  
  public int g()
  {
    return this.jb;
  }
  
  public void a(int paramInt)
  {
    this.jb = paramInt;
    this.ib = (paramInt + 5);
  }
  
  public boolean h()
  {
    return this.hb;
  }
  
  public void d(boolean paramBoolean)
  {
    this.hb = paramBoolean;
  }
  
  public boolean canLayout(a.f.o paramo)
  {
    boolean bool = wb;
    if ((bool) || (this.D != null)) {
      if (bool) {
        break label33;
      }
    }
    label33:
    return this.D.canLayout(paramo);
  }
  
  public byte i()
  {
    return this.P;
  }
  
  public void b(byte paramByte)
  {
    this.P = paramByte;
  }
  
  public boolean j()
  {
    return this.nb;
  }
  
  public void e(boolean paramBoolean)
  {
    this.nb = paramBoolean;
  }
  
  public rc k()
  {
    return this.kb;
  }
  
  public void b(rc paramrc)
  {
    this.kb = paramrc;
    this.lb = true;
  }
  
  public byte l()
  {
    return this.O;
  }
  
  public void c(byte paramByte)
  {
    this.O = paramByte;
    this.lb = false;
    e(this.O);
  }
  
  public byte m()
  {
    return this.R;
  }
  
  public void d(byte paramByte)
  {
    this.R = paramByte;
    if (!wb) {}
    this.gb = (paramByte != -1);
  }
  
  public boolean n()
  {
    return this.ob;
  }
  
  public void f(boolean paramBoolean)
  {
    this.ob = paramBoolean;
  }
  
  public void doLayout(a.f.o paramo)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    if (((bool2) || (paramo != null)) && ((bool2) || (paramo.k() > 0)))
    {
      if (!bool2) {
        if (paramo.c(g) == null)
        {
          if (!bool2) {
            if (paramo.c(h) == null) {
              break label384;
            }
          }
        }
        else {
          this.N = System.currentTimeMillis();
        }
      }
      kc localkc = kc.d(paramo);
      Object localObject2;
      if ((bool2) || (localkc != null))
      {
        localObject1 = localkc.f().h();
        do
        {
          do
          {
            if (!((a.c.y)localObject1).e()) {
              break;
            }
            localObject2 = (a.f.d.a.n)((a.c.y)localObject1).j();
            ((a.f.d.a.n)localObject2).g(((a.f.d.a.n)localObject2).g());
            ((a.f.d.a.n)localObject2).d(((a.f.d.a.n)localObject2).f());
            ((a.c.y)localObject1).f();
            if (bool2) {
              break label170;
            }
            if (bool1) {
              break label164;
            }
          } while (!bool1);
        } while (bool2);
        localObject1 = localkc.e().h();
        label164:
        label170:
        do
        {
          if (!((a.c.y)localObject1).e()) {
            break;
          }
          localObject2 = (pc)((a.c.y)localObject1).j();
          ((pc)localObject2).g(((pc)localObject2).f());
          ((pc)localObject2).d(((pc)localObject2).g());
          ((a.c.y)localObject1).f();
          if ((!bool2) && (bool1)) {
            return;
          }
        } while (!bool1);
      }
      Object localObject1 = c(paramo);
      if (!bool2)
      {
        if (!bool2)
        {
          if (m() == 5)
          {
            localObject2 = paramo.c(g);
            k localk = paramo.c(h);
            p local4 = new p()
            {
              private final k val$node2IsPartial;
              private final k val$edge2IsPartial;
              
              public boolean getBool(Object paramAnonymousObject)
              {
                boolean bool = a.wb;
                a.c.d locald = (a.c.d)paramAnonymousObject;
                if (!bool) {
                  if (this.val$node2IsPartial != null)
                  {
                    if (bool) {
                      break label91;
                    }
                    if (this.val$node2IsPartial.getBool(locald.e())) {
                      break label90;
                    }
                    if (bool) {
                      break label91;
                    }
                    if (this.val$node2IsPartial.getBool(locald.f())) {
                      break label90;
                    }
                  }
                }
                if ((bool) || (this.val$edge2IsPartial != null))
                {
                  if (bool) {
                    break label91;
                  }
                  if (this.val$edge2IsPartial.getBool(locald)) {}
                }
                else
                {
                  return true;
                }
                label90:
                label91:
                return false;
              }
            };
            this.R = wc.a(paramo, local4);
            if (!bool2) {}
            this.gb = (this.R != -1);
          }
          if (bool2) {}
        }
        else
        {
          if (this.R != -1) {
            break label336;
          }
          this.R = 0;
        }
        this.gb = false;
        label336:
        localObject2 = new cb(this)
        {
          protected void a(a.f.o paramAnonymouso)
          {
            a.this.d(paramAnonymouso);
          }
        };
        ((cb)localObject2).a(this.R);
        ((cb)localObject2).a(0);
        ((cb)localObject2).doLayout(paramo);
        if (!bool2)
        {
          a(paramo, (a.d.w)localObject1);
          if (!bool1) {}
        }
        else
        {
          label384:
          if ((bool2) || (this.D != null)) {
            this.D.doLayout(paramo);
          }
        }
      }
    }
  }
  
  private void e(byte paramByte)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    Object localObject;
    if ((bool2) || (paramByte != 4))
    {
      if (bool2) {
        break label57;
      }
      if (paramByte != 0) {}
    }
    else
    {
      localObject = new a.f.l.a.a();
      ((a.f.l.a.a)localObject).b("y.layout.partial.PartialLayouter.ROUTE_EDGE_DPKEY");
      this.kb = ((rc)localObject);
      if ((!bool2) && (!bool1)) {
        return;
      }
    }
    label57:
    if (!bool2) {
      if (paramByte == 1)
      {
        localObject = new d_();
        ((d_)localObject).a("y.layout.partial.PartialLayouter.ROUTE_EDGE_DPKEY");
        this.kb = ((rc)localObject);
        if ((!bool2) && (!bool1)) {
          return;
        }
      }
    }
    if (!bool2) {
      if (paramByte == 2) {
        this.kb = null;
      }
    }
    if (((bool2) || (bool1)) && (paramByte == 3)) {
      this.kb = new hb();
    }
  }
  
  private void g(boolean paramBoolean)
  {
    boolean bool = wb;
    this.fb.b(this.jb);
    this.fb.c(this.hb);
    this.fb.b(true);
    this.fb.a(this.qb);
    this.fb.d(true);
    if (!bool)
    {
      this.fb.d(2147483647);
      if (paramBoolean)
      {
        if (bool) {
          break label97;
        }
        this.fb.a(200);
        if (!vb) {
          return;
        }
      }
    }
    label97:
    this.fb.a(500);
  }
  
  private a.d.w c(a.f.o paramo)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    k localk = paramo.c(g);
    a.c.w localw = paramo.v();
    if (localw.e()) {}
    for (;;)
    {
      if (!bool2)
      {
        a.c.e locale = localw.d();
        if (!bool1)
        {
          if (!bool2)
          {
            if (!localk.getBool(locale))
            {
              if (bool2) {
                break label94;
              }
              this.eb = locale;
              if (!bool1) {}
            }
            else
            {
              localw.f();
            }
          }
          else {
            if (!bool1) {
              break;
            }
          }
          label94:
          if (bool2) {
            continue;
          }
          if (bool2) {
            break label134;
          }
          if (this.eb == null)
          {
            if (bool2) {
              break label134;
            }
            if (paramo.p() != null) {
              this.eb = paramo.p();
            }
          }
        }
      }
    }
    if (this.eb != null) {
      label134:
      return paramo.o(this.eb);
    }
    return null;
  }
  
  public void d(a.f.o paramo)
  {
    boolean bool = wb;
    f(paramo);
    if (!bool)
    {
      if (!this.H.isEmpty())
      {
        a.i.y localy = new a.i.y(paramo);
        localy.a(this.E);
        b(paramo, this.H);
        localy.g();
      }
      i(paramo);
      a(paramo, this.I);
      if (bool) {}
    }
    else if (!this.rb)
    {
      a(paramo, this.G);
    }
    this.db.e();
  }
  
  private void e(a.f.o paramo)
  {
    boolean bool = wb;
    if (!bool)
    {
      if (this.R == -1) {
        return;
      }
      if (bool) {}
    }
    else
    {
      if (this.P != 0) {
        return;
      }
      this.sb = new e(this.jb);
    }
    this.sb.a(paramo, this.db);
  }
  
  private void f(a.f.o paramo)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    this.db = new h(paramo);
    g(paramo);
    e(paramo);
    h(paramo);
    a(paramo);
    b(paramo);
    a.c.m localm = this.G.l();
    do
    {
      if (!localm.e()) {
        break;
      }
      a.c.d locald = localm.a();
      wc.a(paramo, locald, false);
      if (!bool2) {
        if (!cd.b(paramo, locald)) {
          paramo.a(locald, a.d.w.c);
        }
      }
      if (!bool2)
      {
        if (!cd.c(paramo, locald)) {
          paramo.b(locald, a.d.w.c);
        }
        localm.f();
      }
    } while (!bool1);
  }
  
  private void g(a.f.o paramo)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    this.E = new bb();
    this.F = new bb();
    k localk = paramo.c(g);
    a.c.w localw = paramo.v();
    label159:
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      if (!bool2) {
        if (localk.getBool(locale))
        {
          this.E.add(locale);
          if (bool2) {
            continue;
          }
          if (!this.db.e(locale)) {
            break label159;
          }
          this.cb.a(locale, true);
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break label159;
          }
        }
      }
      this.F.add(locale);
      if (!bool2)
      {
        if (this.mb == null) {
          this.mb = paramo.r(locale);
        }
        localw.f();
      }
    } while (!bool1);
  }
  
  private void a(q paramq)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    this.G = new ab();
    if (((bool2) || (this.E != null)) && ((bool2) || (!this.E.isEmpty())))
    {
      a.c.w localw = this.E.l();
      label176:
      label178:
      do
      {
        do
        {
          if (!localw.e()) {
            return;
          }
          a.c.e locale = localw.d();
          a.c.m localm = locale.l();
          do
          {
            if (!localm.e()) {
              break;
            }
            a.c.d locald = localm.a();
            if (bool2) {
              break label178;
            }
            if (bool1) {
              break label176;
            }
            if ((bool2) || (this.U.get(locald.e()) != this.U.get(locald.f()))) {
              this.G.add(locald);
            }
            localm.f();
          } while (!bool1);
        } while (bool2);
        localw.f();
      } while (!bool1);
    }
  }
  
  private void b(q paramq)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    this.H = new ab();
    k localk1 = paramq.c(h);
    if ((bool2) || (localk1 != null))
    {
      k localk2 = paramq.c(g);
      a.c.m localm = paramq.w();
      do
      {
        if (!localm.e()) {
          break;
        }
        a.c.d locald = localm.a();
        if (!bool2)
        {
          if (localk1.getBool(locald)) {
            if ((bool2) || (localk2 != null))
            {
              if (bool2) {
                continue;
              }
              if (!localk2.getBool(locald.e()))
              {
                if (bool2) {
                  continue;
                }
                if (localk2.getBool(locald.f())) {}
              }
            }
            else
            {
              this.H.add(locald);
            }
          }
          localm.f();
        }
      } while (!bool1);
    }
  }
  
  private void h(a.f.o paramo)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    Object localObject3;
    Object localObject4;
    if (!bool2) {
      if (this.P == 0)
      {
        localObject1 = new bb[this.E.size()];
        int i2 = 0;
        localObject3 = this.E.l();
        do
        {
          if (!((a.c.w)localObject3).e()) {
            break;
          }
          localObject4 = ((a.c.w)localObject3).d();
          localObject1[i2] = new bb();
          localObject1[i2].add(localObject4);
          i2++;
          ((a.c.w)localObject3).f();
          if (bool2) {
            break label119;
          }
          if (bool1) {
            break label117;
          }
        } while (!bool1);
        if (bool2) {
          break label540;
        }
        this.I = ((bb[])localObject1);
        label117:
        label119:
        if ((!bool2) && (!bool1)) {
          break label539;
        }
      }
    }
    if (!bool2) {
      if (this.P == 1)
      {
        localObject1 = new a.i.y(paramo);
        b(paramo, (a.i.y)localObject1);
        a(paramo, (a.i.y)localObject1);
        ((a.i.y)localObject1).a(this.F);
        if (bool2) {
          break label540;
        }
        this.I = a.a.m.a(paramo);
        ((a.i.y)localObject1).g();
        if (!bool1) {
          break label539;
        }
      }
    }
    Object localObject5;
    Object localObject6;
    Object localObject7;
    Object localObject8;
    Object localObject9;
    Object localObject10;
    if (this.P == 2)
    {
      localObject1 = new a.i.y(paramo);
      b(paramo, (a.i.y)localObject1);
      a(paramo, (a.i.y)localObject1);
      if (bool2) {
        break label540;
      }
      this.I = a(paramo, this.E);
      ((a.i.y)localObject1).g();
      if (!bool1) {}
    }
    else
    {
      localObject1 = new a.i.y(paramo);
      ((a.i.y)localObject1).a(this.F);
      ((a.i.y)localObject1).c();
      localObject2 = paramo.c(o);
      localObject3 = new ab();
      localObject4 = new HashMap();
      localObject5 = paramo.v();
      label455:
      do
      {
        if (!((a.c.w)localObject5).e()) {
          break;
        }
        localObject6 = ((a.c.w)localObject5).d();
        if (bool2) {
          break label480;
        }
        if (bool1) {
          break label473;
        }
        if (!bool2)
        {
          if (!this.db.e((a.c.e)localObject6))
          {
            if (!bool2) {}
            localObject7 = localObject2 != null ? ((k)localObject2).get(localObject6) : null;
            localObject8 = this.db.b((a.c.e)localObject6);
            localObject9 = new a_(localObject8, localObject7, null);
            if (!bool2) {
              if (((HashMap)localObject4).containsKey(localObject9))
              {
                localObject10 = paramo.a((a.c.e)((HashMap)localObject4).get(localObject9), (a.c.e)localObject6);
                ((ab)localObject3).add(localObject10);
                if (bool2) {
                  continue;
                }
                if (!bool1) {
                  break label455;
                }
              }
            }
            ((HashMap)localObject4).put(localObject9, localObject6);
          }
          ((a.c.w)localObject5).f();
        }
      } while (!bool1);
      if (!bool2) {
        label473:
        this.I = a.a.m.a(paramo);
      }
      label480:
      localObject5 = ((ab)localObject3).l();
      if (((a.c.m)localObject5).e())
      {
        if (bool2) {
          break label547;
        }
        paramo.a(((a.c.m)localObject5).a());
        ((a.c.m)localObject5).f();
      }
      while (bool2)
      {
        if (bool1) {
          break label546;
        }
        if (!bool1) {
          break;
        }
      }
      ((a.i.y)localObject1).g();
    }
    label539:
    label540:
    this.U = db.a();
    label546:
    label547:
    Object localObject1 = paramo.v();
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.w)localObject1).d();
      if (!bool2)
      {
        if (bool1) {
          break label601;
        }
        this.U.a(localObject2, "remain");
        ((a.c.w)localObject1).f();
      }
    } while (!bool1);
    label601:
    int i1 = this.I.length;
    Object localObject2 = new String[i1];
    this.Y = new HashMap();
    this.X = db.a();
    int i3 = 0;
    label756:
    do
    {
      do
      {
        if (i3 >= i1) {
          break;
        }
        localObject2[i3] = ("component" + String.valueOf(i3));
        localObject4 = this.I[i3];
        if (bool1) {
          break label948;
        }
        localObject5 = ((bb)localObject4).l();
        do
        {
          if (!((a.c.w)localObject5).e()) {
            break label756;
          }
          localObject6 = ((a.c.w)localObject5).d();
          this.U.a(localObject6, localObject2[i3]);
          this.Y.put(localObject6, localObject4);
          ((a.c.w)localObject5).f();
          if ((!bool2) && (bool1)) {
            break;
          }
        } while (!bool1);
        localObject5 = this.db.b(((bb)localObject4).m());
        if (!bool2)
        {
          if (bool2) {
            break label948;
          }
          if (localObject5 != null)
          {
            localObject6 = (z)this.X.get(localObject5);
            if (!bool2)
            {
              if (localObject6 != null)
              {
                ((z)localObject6).add(localObject4);
                if (bool2) {
                  continue;
                }
                if (!bool1) {}
              }
              else
              {
                localObject6 = new z();
              }
            }
            else
            {
              ((z)localObject6).add(localObject4);
              this.X.a(localObject5, localObject6);
            }
          }
          i3++;
        }
      } while (!bool1);
      this.V = new HashMap();
      this.W = new HashMap();
      this.ab = new HashMap();
      this.bb = new HashMap();
    } while (bool2);
    i3 = 0;
    if (i3 < i1) {}
    label948:
    label1252:
    label1256:
    while (bool2)
    {
      localObject4 = this.I[i3];
      localObject5 = (String)this.U.get(((bb)localObject4).m());
      localObject6 = new bb();
      localObject7 = new ab();
      localObject8 = new ab();
      localObject9 = new ab();
      if (bool1) {
        return;
      }
      localObject10 = ((bb)localObject4).l();
      do
      {
        if (!((a.c.w)localObject10).e()) {
          break;
        }
        a.c.e locale1 = ((a.c.w)localObject10).d();
        if (bool2) {
          break label1256;
        }
        if (bool1) {
          break label1252;
        }
        a.c.m localm = locale1.l();
        do
        {
          do
          {
            if (!localm.e()) {
              break label1175;
            }
            a.c.d locald = localm.a();
            a.c.e locale2 = locald.a(locale1);
            String str = (String)this.U.get(locale2);
            if (bool1) {
              break;
            }
            if (str.equals("remain"))
            {
              ((bb)localObject6).add(locale2);
              ((ab)localObject7).add(locald);
            }
            if (!bool2)
            {
              if (!str.equals(localObject5)) {
                ((ab)localObject8).add(locald);
              }
            }
            else
            {
              if (bool2) {
                continue;
              }
              if (!bool1) {
                break label1163;
              }
            }
            if (locald.e() == locale1) {
              ((ab)localObject9).add(locald);
            }
            localm.f();
          } while (!bool1);
          ((a.c.w)localObject10).f();
        } while (bool2);
      } while (!bool1);
      this.W.put(localObject5, localObject7);
      this.V.put(localObject5, localObject6);
      this.ab.put(localObject4, localObject8);
      if (!bool2) {}
      this.bb.put(localObject4, localObject9);
      i3++;
      if (!bool1) {
        break;
      }
    }
    label1163:
    label1175:
    m(paramo);
  }
  
  private void i(a.f.o paramo)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    if (((bool2) || (a() != null)) && ((bool2) || (this.I != null)))
    {
      if (!bool2) {
        if ((this.D instanceof a.f.d.e))
        {
          ((a.f.d.e)this.D).a(this.ib);
          ((a.f.d.e)this.D).b(this.jb);
        }
      }
      if (!bool2) {
        if ((this.D instanceof a.f.g.f)) {
          ((a.f.g.f)this.D).g(this.jb);
        }
      }
      if (!bool2) {
        if ((this.D instanceof j)) {
          ((j)this.D).b(this.jb);
        }
      }
      int i1 = this.I.length;
      a.i.y localy = new a.i.y(paramo);
      int i2 = 0;
      do
      {
        if (i2 >= i1) {
          break;
        }
        bb localbb = this.I[i2];
        a.d.w localw1 = a(paramo, localbb);
        localy.b();
        localy.a(localbb, true);
        j(paramo);
        Rectangle2D localRectangle2D = d(paramo, localbb);
        a.d.w localw2 = new a.d.w(localRectangle2D.getX() + localRectangle2D.getWidth() / 2.0D, localRectangle2D.getY() + localRectangle2D.getHeight() / 2.0D);
        wc.b(paramo, localbb.l(), localw1.a - localw2.a, localw1.b - localw2.b);
        localy.g();
        i2++;
      } while (!bool1);
    }
  }
  
  protected void j(a.f.o paramo)
  {
    new a.f.s(this.D).doLayout(paramo);
  }
  
  private a.d.w a(a.f.o paramo, bb parambb)
  {
    boolean bool = vb;
    double d1 = 0.0D;
    double d2 = 0.0D;
    a.c.w localw = parambb.l();
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      d1 += paramo.m(locale);
      d2 += paramo.n(locale);
      localw.f();
    } while (!bool);
    return new a.d.w(d1 / parambb.size(), d2 / parambb.size());
  }
  
  protected void a(a.f.o paramo, bb[] paramArrayOfbb)
  {
    boolean bool = wb;
    this.Z = new HashMap();
    if (!bool) {}
    g(this.Q == 3);
    if (!bool) {
      if (this.Q == 2)
      {
        a(paramo, paramArrayOfbb, false);
        k(paramo);
        if (!bool)
        {
          if (!this.ob) {
            return;
          }
          l(paramo);
          a(paramo, paramArrayOfbb, false);
          k(paramo);
        }
      }
    }
    if (((!bool) && ((vb) && (bool))) || (this.Q == 3)) {
      a(paramo, paramArrayOfbb, true);
    }
  }
  
  private a.d.s a(a.c.e parame, t paramt, double paramDouble1, double paramDouble2, a.f.o paramo)
  {
    boolean bool = wb;
    double d1 = paramDouble1 * 1.5D;
    double d2 = paramDouble2 * 1.5D;
    if (!bool)
    {
      if (paramt != null) {
        d1 = Math.max(d1, paramt.a);
      }
    }
    else {
      d2 = Math.max(d2, paramt.b);
    }
    u localu = a(parame, paramo);
    d1 += localu.c + localu.e;
    d2 += localu.b + localu.d;
    k localk = paramo.c(i.e);
    if ((bool) || (localk != null))
    {
      a.d.s locals = (a.d.s)localk.get(parame);
      if (bool) {
        break label170;
      }
      if (locals != null)
      {
        d1 = Math.max(d1, locals.a);
        d2 = Math.max(d2, locals.b);
      }
    }
    label170:
    return new a.d.s(d1, d2);
  }
  
  private t a(z paramz)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    if (((bool2) || (paramz != null)) && (!paramz.isEmpty()))
    {
      double d1 = 1.7976931348623157E+308D;
      double d2 = -1.797693134862316E+308D;
      double d3 = 1.7976931348623157E+308D;
      double d4 = -1.797693134862316E+308D;
      a.c.y localy = paramz.h();
      do
      {
        if (!localy.e()) {
          break;
        }
        if (bool1) {
          break label167;
        }
        t localt = (t)localy.j();
        d1 = Math.min(d1, localt.d());
        d2 = Math.max(d2, localt.d() + localt.b());
        d3 = Math.min(d3, localt.e());
        d4 = Math.max(d4, localt.e() + localt.c());
        localy.f();
      } while (!bool1);
      label167:
      return new t(d1, d3, d2 - d1, d4 - d3);
    }
    return null;
  }
  
  private static t a(t paramt1, t paramt2)
  {
    boolean bool = wb;
    if (!bool) {
      if (paramt1 == null) {
        return paramt2;
      }
    }
    if (!bool) {
      if (paramt2 == null) {
        return paramt1;
      }
    }
    double d1 = Math.max(paramt1.d(), paramt2.d());
    double d2 = Math.max(paramt1.e(), paramt2.e());
    double d3 = Math.min(paramt1.d() + paramt1.b(), paramt2.d() + paramt2.b());
    double d4 = Math.min(paramt1.e() + paramt1.c(), paramt2.e() + paramt2.c());
    return new t(d1, d2, d3 - d1, d4 - d2);
  }
  
  private void k(a.f.o paramo)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    bb localbb = this.db.d(this.db.d());
    localbb.j();
    a.c.w localw = localbb.l();
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      if (!bool2)
      {
        if (this.cb.getBool(locale)) {
          a(locale, paramo);
        }
        localw.f();
      }
    } while (!bool1);
  }
  
  private void a(a.c.e parame, a.f.o paramo)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    double d1 = 1.7976931348623157E+308D;
    double d2 = -1.797693134862316E+308D;
    double d3 = 1.7976931348623157E+308D;
    double d4 = -1.797693134862316E+308D;
    bb localbb = this.db.c(parame);
    if ((bool2) || (localbb.size() > 0))
    {
      Object localObject1 = localbb.l();
      Object localObject2;
      do
      {
        if (!((a.c.w)localObject1).e()) {
          break;
        }
        localObject2 = paramo.v(((a.c.w)localObject1).d());
        d1 = Math.min(d1, ((t)localObject2).d());
        d2 = Math.max(d2, ((t)localObject2).d() + ((t)localObject2).b());
        d3 = Math.min(d3, ((t)localObject2).e());
        d4 = Math.max(d4, ((t)localObject2).e() + ((t)localObject2).c());
        ((a.c.w)localObject1).f();
        if ((!bool2) && (bool1)) {
          return;
        }
      } while (!bool1);
      localObject1 = paramo.c(i.d);
      if (!bool2)
      {
        if (!bool2) {
          if (localObject1 != null)
          {
            if (bool2) {
              break label254;
            }
            localObject2 = u.a(((k)localObject1).get(parame));
            if (localObject2 != null)
            {
              d1 -= ((u)localObject2).c;
              d2 += ((u)localObject2).e;
              d3 -= ((u)localObject2).b;
              d4 += ((u)localObject2).d;
            }
          }
        }
        label254:
        localObject2 = paramo.c(i.e);
        if (!bool2)
        {
          if (localObject2 != null)
          {
            a.d.s locals = (a.d.s)((k)localObject2).get(parame);
            if (bool2) {
              break label394;
            }
            if (locals != null)
            {
              double d5 = locals.a - d2 + d1;
              double d6 = locals.b - d4 + d3;
              if (!bool2)
              {
                if (d5 > 0.0D)
                {
                  d1 -= d5 * 0.5D;
                  d2 += d5 * 0.5D;
                }
                if (bool2) {}
              }
              else
              {
                if (d6 <= 0.0D) {
                  break label380;
                }
                d3 -= d6 * 0.5D;
              }
              d4 += d6 * 0.5D;
            }
          }
          label380:
          paramo.b(parame, d2 - d1, d4 - d3);
        }
        label394:
        paramo.c(parame, d1, d3);
      }
    }
  }
  
  private boolean a(a.c.e parame, a.f.o paramo, a.c.x paramx)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    double d1 = 1.7976931348623157E+308D;
    double d2 = -1.797693134862316E+308D;
    double d3 = 1.7976931348623157E+308D;
    double d4 = -1.797693134862316E+308D;
    Object localObject1 = this.db.c(parame).l();
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.w)localObject1).d();
      if (bool1) {
        break label211;
      }
      if ((bool2) || (!paramx.getBool(localObject2)))
      {
        if (bool2) {
          continue;
        }
        if (this.db.e((a.c.e)localObject2))
        {
          if (bool2) {
            continue;
          }
          if (this.cb.getBool(localObject2)) {}
        }
      }
      else
      {
        t localt = paramo.v(((a.c.w)localObject1).d());
        d1 = Math.min(d1, localt.d());
        d2 = Math.max(d2, localt.d() + localt.b());
        d3 = Math.min(d3, localt.e());
        d4 = Math.max(d4, localt.e() + localt.c());
      }
      ((a.c.w)localObject1).f();
    } while (!bool1);
    label211:
    localObject1 = paramo.c(i.d);
    if ((bool2) || (localObject1 != null))
    {
      localObject2 = u.a(((k)localObject1).get(parame));
      if (!bool2)
      {
        if (localObject2 != null)
        {
          d1 -= ((u)localObject2).c;
          d2 += ((u)localObject2).e;
          d3 -= ((u)localObject2).b;
        }
      }
      else {
        d4 += ((u)localObject2).d;
      }
    }
    Object localObject2 = paramo.v(parame);
    d1 = Math.min(d1, ((t)localObject2).d);
    d3 = Math.min(d3, ((t)localObject2).e);
    d2 = Math.max(d2, ((t)localObject2).d + ((t)localObject2).a);
    d4 = Math.max(d4, ((t)localObject2).e + ((t)localObject2).b);
    paramo.b(parame, d2 - d1, d4 - d3);
    paramo.c(parame, d1, d3);
    if (!bool2) {}
    return !paramo.v(parame).equals(localObject2);
  }
  
  private u a(a.c.e parame, q paramq)
  {
    boolean bool = wb;
    k localk = paramq.c(i.d);
    if ((bool) || (localk != null))
    {
      u localu = u.a(localk.get(parame));
      if (bool) {
        break label50;
      }
      if (localu != null) {
        return localu;
      }
    }
    label50:
    return tb;
  }
  
  private c a(bb parambb, a.f.o paramo, a.c.x paramx, t paramt)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    c localc = new c();
    a.c.e locale1 = parambb.m();
    a.c.e locale2 = this.db.b(locale1);
    Object localObject2;
    if (locale2 != null)
    {
      localObject1 = paramo.v(locale2);
      localObject2 = a(locale2, paramo);
      localc.a = new t(((t)localObject1).d + ((u)localObject2).c, ((t)localObject1).e + ((u)localObject2).b, ((t)localObject1).a - ((u)localObject2).c - ((u)localObject2).e, ((t)localObject1).b - ((u)localObject2).b - ((u)localObject2).d);
      if (!bool2) {
        if (!this.cb.getBool(locale2))
        {
          if (bool2) {
            break label175;
          }
          if (this.L) {
            break label174;
          }
        }
      }
      if (!bool2) {}
      label174:
      label175:
      localc.c = (this.fb.n());
    }
    if (paramt != null) {
      localc.a = a(localc.a, paramt);
    }
    Object localObject3;
    t localt1;
    if (localc.c)
    {
      localObject1 = paramo.v(locale1);
      localObject2 = this.M.l();
      do
      {
        if (!((a.c.w)localObject2).e()) {
          break;
        }
        localObject3 = ((a.c.w)localObject2).d();
        if (bool2) {
          break label570;
        }
        localt1 = paramo.v((a.c.e)localObject3);
        if (bool1) {
          break label568;
        }
        if (localObject3 != locale2)
        {
          if (bool2) {
            continue;
          }
          if (!localt1.b((t)localObject1))
          {
            if (bool2) {
              continue;
            }
            if (!((t)localObject1).b(localt1))
            {
              t localt2 = new t(localt1.d - this.jb, localt1.e - this.jb, localt1.b() + 2 * this.jb, localt1.c() + 2 * this.jb);
              localc.b.add(localt2);
            }
          }
        }
        ((a.c.w)localObject2).f();
      } while (!bool1);
    }
    Object localObject1 = this.db.c(locale2).l();
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.w)localObject1).d();
      if (bool1) {
        break label560;
      }
      if (!bool2)
      {
        if (this.db.e((a.c.e)localObject2)) {
          if ((bool2) || (!paramx.getBool(localObject2)))
          {
            if (bool2) {
              continue;
            }
            if (this.cb.getBool(localObject2)) {}
          }
          else
          {
            localObject3 = paramo.v((a.c.e)localObject2);
            localt1 = new t(((t)localObject3).d - this.jb, ((t)localObject3).e - this.jb, ((t)localObject3).b() + 2 * this.jb, ((t)localObject3).c() + 2 * this.jb);
            localc.b.add(localt1);
          }
        }
        ((a.c.w)localObject1).f();
      }
    } while (!bool1);
    label560:
    localObject1 = c(paramo, locale1);
    label568:
    if (localObject1 != null) {
      label570:
      localc.a = a(localc.a, (t)localObject1);
    }
    if (this.sb != null)
    {
      if (bool2) {
        break label677;
      }
      if (localc.a == null)
      {
        localObject2 = this.sb.a(locale1, paramo, paramx);
        if (!bool2)
        {
          if (localObject2 != null) {
            if (bool2) {
              break label677;
            }
          }
        }
        else
        {
          localObject3 = a(localc.a, (t)localObject2);
          if ((((t)localObject3).a > 0.0D) && (((t)localObject3).b > 0.0D)) {
            localc.a = ((t)localObject3);
          }
        }
      }
    }
    label677:
    return localc;
  }
  
  private a.d.s a(a.f.o paramo, a.c.e parame)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    a.c.e locale = this.db.b(parame);
    do
    {
      do
      {
        if (locale == null) {
          break;
        }
        if (!bool2)
        {
          if (!this.cb.getBool(locale)) {
            break;
          }
          locale = this.db.b(locale);
        }
      } while (!bool1);
    } while (bool2);
    if (locale != null) {
      return paramo.v(locale);
    }
    return new a.d.s(0.0D, 0.0D);
  }
  
  private double a(a.f.d.a.n paramn)
  {
    boolean bool = wb;
    if (!bool) {
      if (this.R == 2) {
        return paramn.h() - paramn.e();
      }
    }
    if (!bool) {
      if (this.R == 1) {
        return paramn.h();
      }
    }
    if (this.R == 3) {
      return paramn.h() - paramn.e();
    }
    return paramn.h();
  }
  
  private double a(pc parampc)
  {
    if ((wb) || ((this.R == 2) || (this.R == 1))) {
      return parampc.h() - parampc.e();
    }
    return parampc.h();
  }
  
  private t c(a.f.o paramo, a.c.e parame)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    k localk = paramo.c(kc.b);
    if ((bool2) || ((localk != null) && (localk.get(parame) != null)))
    {
      double d1 = 1.7976931348623157E+308D;
      double d2 = 1.7976931348623157E+308D;
      double d3 = -1.797693134862316E+308D;
      double d4 = -1.797693134862316E+308D;
      jc localjc = (jc)localk.get(parame);
      Iterator localIterator = localjc.a().iterator();
      do
      {
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          jc.b_ localb_ = (jc.b_)localIterator.next();
          a.f.d.a.n localn = localb_.b();
          d1 = Math.min(d1, a(localn) + localn.c());
          d3 = Math.max(d3, a(localn) + localn.e() - localn.d());
          pc localpc = localb_.a();
          d2 = Math.min(d2, a(localpc) + localpc.c());
          d4 = Math.max(d4, a(localpc) + localpc.e() - localpc.d());
          if ((!bool2) && (bool1)) {
            break label246;
          }
        } while (!bool1);
      } while (bool2);
      if ((bool2) || ((this.R == 1) || (this.R == 3))) {
        label246:
        return new t(d2, d1, d4 - d2, d3 - d1);
      }
      return new t(d1, d2, d3 - d1, d4 - d2);
    }
    return null;
  }
  
  private boolean a(a.f.o paramo, a.c.e parame, boolean paramBoolean, a.c.x paramx)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    double d1 = 5 + this.jb;
    z localz = new z();
    a.d.s locals1 = a(paramo, parame);
    t localt1 = c(paramo, parame);
    if (!bool2) {
      if (localt1 != null)
      {
        if (bool2) {
          break label101;
        }
        locals2 = new a.d.s(Math.min(locals1.a, localt1.a), Math.min(locals1.b, localt1.b));
        if (!bool1) {
          break label103;
        }
      }
    }
    label101:
    a.d.s locals2 = locals1;
    label103:
    double d2 = 0.0D;
    double d3 = 0.0D;
    Object localObject1 = this.db.c(parame).l();
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.w)localObject1).d();
      if (bool2) {
        break label310;
      }
      if (bool1) {
        break label305;
      }
      if (!bool2)
      {
        if (paramx.getBool(localObject2))
        {
          localz.add(paramo.v((a.c.e)localObject2));
          if (!bool2)
          {
            if (locals2.c() - (d3 + paramo.t((a.c.e)localObject2)) > locals2.b() - (d2 + paramo.s((a.c.e)localObject2)))
            {
              d3 += paramo.t((a.c.e)localObject2) + d1;
              d2 = Math.max(d2, paramo.s((a.c.e)localObject2));
              if (bool2) {
                continue;
              }
              if (!bool1) {}
            }
            else
            {
              d3 = Math.max(d3, paramo.t((a.c.e)localObject2));
            }
          }
          else {
            d2 += paramo.s((a.c.e)localObject2) + d1;
          }
        }
        ((a.c.w)localObject1).f();
      }
    } while (!bool1);
    if (!bool2) {}
    label305:
    label310:
    localObject1 = (z)this.X.get(parame);
    Object localObject3;
    Object localObject4;
    if ((bool2) || (localObject1 != null))
    {
      localObject2 = ((z)localObject1).h();
      label496:
      do
      {
        if (!((a.c.y)localObject2).e()) {
          break;
        }
        localObject3 = (bb)((a.c.y)localObject2).j();
        localObject4 = ((bb)localObject3).m();
        if (bool1) {
          break label729;
        }
        Object localObject5;
        if ((bool2) || (this.db.e((a.c.e)localObject4)))
        {
          localObject5 = (a.d.s)this.J.get(localObject4);
          if (!bool2) {
            if (locals2.c() - (d3 + ((a.d.s)localObject5).c()) > locals2.b() - (d2 + ((a.d.s)localObject5).b()))
            {
              d3 += ((a.d.s)localObject5).c() + d1;
              d2 = Math.max(d2, ((a.d.s)localObject5).b());
              if (!bool2) {
                if (!bool1) {
                  break label496;
                }
              }
            }
            else
            {
              d3 = Math.max(d3, ((a.d.s)localObject5).c());
            }
          }
          d2 += ((a.d.s)localObject5).b() + d1;
          t localt2 = (t)this.K.get(localObject4);
          if (bool2) {
            continue;
          }
          if (localt2 != null)
          {
            u localu = a((a.c.e)localObject4, paramo);
            localz.add(new t(localt2.d - localu.c, localt2.e - localu.b, localt2.a + localu.c + localu.e, localt2.b + localu.b + localu.d));
            if (bool2) {
              continue;
            }
            if (!bool1) {}
          }
        }
        else
        {
          localObject5 = d(paramo, (bb)localObject3);
          if (!bool2)
          {
            if (locals2.c() - (d3 + ((Rectangle2D)localObject5).getHeight()) > locals2.b() - (d2 + ((Rectangle2D)localObject5).getWidth()))
            {
              d3 += ((Rectangle2D)localObject5).getHeight() + d1;
              d2 = Math.max(d2, ((Rectangle2D)localObject5).getWidth());
              if (bool2) {
                continue;
              }
              if (!bool1) {}
            }
            else
            {
              d3 = Math.max(d3, ((Rectangle2D)localObject5).getHeight());
            }
          }
          else {
            d2 += ((Rectangle2D)localObject5).getWidth() + d1;
          }
        }
        ((a.c.y)localObject2).f();
      } while (!bool1);
    }
    label729:
    Object localObject2 = a(localz);
    this.K.a(parame, localObject2);
    if (!bool2) {
      if (paramBoolean)
      {
        this.J.a(parame, paramo.v(parame));
        return false;
      }
    }
    if (!bool2)
    {
      if (this.db.c(parame).size() > 0)
      {
        localObject3 = (a.d.s)this.J.get(parame);
        localObject4 = a(parame, (t)localObject2, d2, d3, paramo);
        this.J.a(parame, localObject4);
        if ((bool2) || (localObject3 != null)) {
          if (bool2) {}
        }
        return !((a.d.s)localObject3).equals(localObject4);
      }
      this.J.a(parame, paramo.v(parame));
    }
    return false;
  }
  
  private void a(a.f.o paramo, boolean paramBoolean, a.c.x paramx)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    this.J = db.a();
    this.K = db.a();
    bb localbb = this.db.d(this.db.d());
    localbb.j();
    a.c.w localw = localbb.l();
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      if (!bool2)
      {
        if (this.cb.getBool(locale)) {
          a(paramo, locale, paramBoolean, paramx);
        }
        localw.f();
      }
    } while (!bool1);
  }
  
  private void a(a.f.o paramo, bb[] paramArrayOfbb, boolean paramBoolean)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    a.c.x localx1 = db.a();
    a.c.x localx2 = db.a();
    Object localObject = this.F.l();
    do
    {
      while (!bool1)
      {
        if (!((a.c.w)localObject).e()) {
          break;
        }
        localx1.a(((a.c.w)localObject).d(), true);
        localx2.a(((a.c.w)localObject).d(), true);
        ((a.c.w)localObject).f();
      }
    } while (bool2);
    localObject = new p()
    {
      private final a.c.x val$node2IsProcessed;
      
      public boolean getBool(Object paramAnonymousObject)
      {
        boolean bool = a.wb;
        if ((bool) || (this.val$node2IsProcessed.getBool(paramAnonymousObject))) {
          if (bool) {}
        }
        return !a.this.db.e((a.c.e)paramAnonymousObject);
      }
    };
    a.c.n localn = db.b();
    a.c.m localm = paramo.w();
    do
    {
      if (!localm.e()) {
        break;
      }
      a.c.d locald = localm.a();
      if (bool2) {
        break label236;
      }
      if (bool1) {
        break label227;
      }
      localn.a(locald, this.U.get(locald.e()) == this.U.get(locald.f()));
      localm.f();
    } while (!bool1);
    a(paramo, paramBoolean, localx2);
    if (!bool2)
    {
      a(paramo, paramArrayOfbb, this.F, paramBoolean, localx1, localx2, localn, (k)localObject);
      label227:
      label236:
      if ((!bool2) && (!this.nb)) {}
    }
    else
    {
      a(paramo, paramBoolean, localx1, localx2, localn, (k)localObject);
    }
  }
  
  private void a(a.f.o paramo, boolean paramBoolean, a.c.x paramx1, a.c.x paramx2, a.c.n paramn, k paramk)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    int i1 = 0;
    label164:
    label364:
    label366:
    label505:
    do
    {
      if (i1 >= this.I.length) {
        break;
      }
      bb localbb = this.I[i1];
      int i2 = 0;
      a.c.m localm;
      a.c.d locald;
      do
      {
        localObject1 = localbb.l();
        do
        {
          do
          {
            if (!((a.c.w)localObject1).e()) {
              break;
            }
            localObject2 = ((a.c.w)localObject1).d();
            if (bool2) {
              break label390;
            }
            if (bool1) {
              break label388;
            }
            localm = ((a.c.e)localObject2).n();
            a.c.e locale1;
            a.c.e locale2;
            do
            {
              if (!localm.e()) {
                break;
              }
              locald = localm.a();
              locale1 = locald.f();
              locale2 = locald.e();
              if (bool1) {
                break label164;
              }
              if (paramo.n(locale1) <= paramo.n(locale2))
              {
                i2 = 1;
                if (!bool2) {
                  if (!bool1) {
                    break;
                  }
                }
              }
              else
              {
                localm.f();
              }
            } while (!bool1);
            if ((!bool2) && (i2 != 0)) {
              break;
            }
            localm = ((a.c.e)localObject2).m();
            do
            {
              if (!localm.e()) {
                break;
              }
              locald = localm.a();
              locale1 = locald.f();
              locale2 = locald.e();
              if (bool1) {
                break label263;
              }
              if (paramo.n(locale1) <= paramo.n(locale2))
              {
                i2 = 1;
                if (!bool2) {
                  if (!bool1) {
                    break;
                  }
                }
              }
              else
              {
                localm.f();
              }
            } while (!bool1);
            if (!bool2)
            {
              if (i2 != 0) {
                break;
              }
              ((a.c.w)localObject1).f();
            }
          } while (!bool1);
        } while (bool2);
        if (i2 == 0) {
          break label551;
        }
      } while (bool2);
      Object localObject1 = localbb.l();
      do
      {
        do
        {
          if (!((a.c.w)localObject1).e()) {
            break;
          }
          localObject2 = ((a.c.w)localObject1).d();
          paramx1.a(localObject2, false);
          if (bool2) {
            break label366;
          }
          ((a.c.w)localObject1).f();
          if (bool1) {
            break label364;
          }
        } while (!bool1);
      } while (bool2);
      localObject1 = paramo.v();
      do
      {
        if (!((a.c.w)localObject1).e()) {
          break label505;
        }
        localObject2 = ((a.c.w)localObject1).d();
        if (bool1) {
          break;
        }
        localm = ((a.c.e)localObject2).l();
        do
        {
          do
          {
            if (!localm.e()) {
              break label488;
            }
            locald = localm.a();
            if (bool1) {
              break;
            }
            if ((paramx1.getBool(locald.a((a.c.e)localObject2))) && (this.U.get(locald.e()) != this.U.get(locald.f()))) {
              paramn.a(locald, false);
            }
            localm.f();
          } while (!bool1);
          ((a.c.w)localObject1).f();
        } while (bool2);
      } while (!bool1);
      localObject1 = new bb[1];
      localObject1[0] = localbb;
      Object localObject2 = new bb();
      a(paramo, (bb[])localObject1, (bb)localObject2, paramBoolean, paramx1, paramx2, paramn, paramk);
      if (!bool2)
      {
        i2 = 0;
        i1++;
      }
    } while (!bool1);
    label263:
    label488:
    return;
  }
  
  private void a(a.f.o paramo, bb[] paramArrayOfbb, bb parambb, boolean paramBoolean, a.c.x paramx1, a.c.x paramx2, a.c.n paramn, k paramk)
  {
    boolean bool3 = wb;
    boolean bool2 = vb;
    bb localbb1 = new bb(parambb);
    int i1 = 0;
    label27:
    label222:
    label999:
    label1015:
    label1019:
    label1277:
    do
    {
      if (i1 >= paramArrayOfbb.length) {
        break;
      }
      bb localbb2 = paramArrayOfbb[i1];
      if ((bool3) || (localbb2 != null)) {
        if (!bool3)
        {
          if (localbb2.size() <= 0) {}
        }
        else
        {
          Object localObject6;
          Object localObject7;
          do
          {
            if (!bool3) {
              if (this.cb.getBool(localbb2.m()))
              {
                localObject1 = localbb2.m();
                localObject2 = (String)this.U.get(localObject1);
                Object localObject4;
                t localt;
                do
                {
                  localObject3 = (bb)this.V.get(localObject2);
                  localObject4 = this.db.g((a.c.e)localObject1).l();
                  do
                  {
                    do
                    {
                      if (!((a.c.m)localObject4).e()) {
                        break;
                      }
                      localObject6 = ((a.c.m)localObject4).a();
                      if (bool2) {
                        break label222;
                      }
                      if (paramx1.getBool(((a.c.d)localObject6).e())) {
                        ((bb)localObject3).add(((a.c.d)localObject6).e());
                      }
                      ((a.c.m)localObject4).f();
                    } while (!bool2);
                  } while (bool3);
                  localObject4 = this.db.h((a.c.e)localObject1).l();
                  do
                  {
                    if (!((a.c.m)localObject4).e()) {
                      break label277;
                    }
                    localObject6 = ((a.c.m)localObject4).a();
                    if (bool2) {
                      break;
                    }
                    if (paramx1.getBool(((a.c.d)localObject6).f())) {
                      ((bb)localObject3).add(((a.c.d)localObject6).f());
                    }
                    ((a.c.m)localObject4).f();
                  } while (!bool2);
                  localObject4 = (a.d.s)this.J.get(localObject1);
                  paramo.a((a.c.e)localObject1, (a.d.s)localObject4);
                  localObject6 = null;
                  localt = (t)this.K.get(localObject1);
                } while (bool3);
                if ((bool3) || (localt != null))
                {
                  double d3 = ((a.d.s)localObject4).a - localt.a;
                  double d4 = ((a.d.s)localObject4).b - localt.b;
                  localObject6 = new t(localt.d - d3, localt.e - d4, localt.a + 2.0D * d3, localt.b + 2.0D * d4);
                }
                localObject7 = a(localbb2, paramo, paramx1, (t)localObject6);
                if (!bool3) {}
                localObject8 = a(paramo, localbb1, paramx1, localbb2, (c)localObject7, !paramBoolean, this.J);
                paramo.a((a.c.e)localObject1, (a.d.w)localObject8);
                this.fb.c(false);
                if (!bool3) {}
                this.fb.a(this.pb == 2147483647L ? 2147483647L : this.pb - System.currentTimeMillis() + this.N);
                h_ localh_ = new h_((a.c.e)localObject1, paramk);
                this.fb.a(paramo, localh_, paramn, localbb2, (c)localObject7, (SortedSet)this.Z.get(localbb2), this.gb);
                paramx1.a(localObject1, true);
                if (!bool2) {
                  break label833;
                }
              }
            }
            localObject1 = a(localbb2, paramo, paramx1, null);
          } while (bool3);
          if (!paramBoolean) {}
          Object localObject2 = a(paramo, localbb1, paramx1, localbb2, (c)localObject1, !bool3, this.J);
          Object localObject3 = d(paramo, localbb2);
          double d1 = -(((Rectangle2D)localObject3).getCenterX() - ((a.d.w)localObject2).a);
          double d2 = -(((Rectangle2D)localObject3).getCenterY() - ((a.d.w)localObject2).b);
          wc.b(paramo, localbb2.l(), d1, d2);
          this.fb.c(h());
          if (!bool3) {}
          this.fb.a(this.pb == 2147483647L ? 2147483647L : this.pb - System.currentTimeMillis() + this.N);
          this.fb.a(paramo, paramk, paramn, localbb2, (c)localObject1, (SortedSet)this.Z.get(localbb2), this.gb);
          Object localObject8 = localbb2.l();
          do
          {
            do
            {
              if (!((a.c.w)localObject8).e()) {
                break;
              }
              paramx1.a(((a.c.w)localObject8).d(), true);
              ((a.c.w)localObject8).f();
              if ((!bool3) && (bool2)) {
                break label833;
              }
            } while (!bool2);
          } while (bool3);
          localbb1.addAll(localbb2);
          Object localObject1 = this.db.b(localbb2.m());
          if (!this.L)
          {
            if (bool3) {
              break label1019;
            }
            if (!this.fb.n()) {}
          }
          else if (localObject1 != null)
          {
            if (!bool3) {
              if (this.cb.getBool(localObject1))
              {
                bool1 = a(paramo, (a.c.e)localObject1, paramBoolean, paramx2);
                break label920;
              }
            }
            boolean bool1 = a((a.c.e)localObject1, paramo, paramx1);
            localObject3 = this.db.b((a.c.e)localObject1);
            do
            {
              if (!bool1) {
                break label1015;
              }
              if (bool2) {
                break;
              }
              if (localObject3 == null) {
                break label1015;
              }
              if (!bool3) {
                if (this.cb.getBool(localObject3))
                {
                  bool1 = a(paramo, (a.c.e)localObject3, paramBoolean, paramx2);
                  if (bool3) {
                    continue;
                  }
                  if (!bool2) {
                    break label999;
                  }
                }
              }
              bool1 = a((a.c.e)localObject3, paramo, paramx1);
              localObject3 = this.db.b((a.c.e)localObject3);
            } while (!bool2);
          }
          if (this.rb)
          {
            a.i.y localy;
            do
            {
              localy = new a.i.y(paramo);
              do
              {
                localObject3 = paramo.v();
                do
                {
                  if (!((a.c.w)localObject3).e()) {
                    break label1098;
                  }
                  localObject5 = ((a.c.w)localObject3).d();
                  if (bool3) {
                    break label27;
                  }
                  if (bool2) {
                    break;
                  }
                  if (!paramx1.getBool(localObject5)) {
                    localy.a((a.c.e)localObject5);
                  }
                  ((a.c.w)localObject3).f();
                } while (!bool2);
                localObject3 = new ab();
              } while (bool3);
              Object localObject5 = localbb2.l();
              do
              {
                do
                {
                  if (!((a.c.w)localObject5).e()) {
                    break label1247;
                  }
                  localObject6 = ((a.c.w)localObject5).d();
                  if (bool2) {
                    break label1277;
                  }
                  a.c.m localm = ((a.c.e)localObject6).l();
                  do
                  {
                    do
                    {
                      if (!localm.e()) {
                        break label1230;
                      }
                      localObject7 = localm.a();
                      if ((!bool3) && (bool2)) {
                        break;
                      }
                      if (this.U.get(((a.c.d)localObject7).e()) != this.U.get(((a.c.d)localObject7).f())) {
                        ((ab)localObject3).add(localObject7);
                      }
                      localm.f();
                    } while (!bool2);
                    ((a.c.w)localObject5).f();
                  } while (bool3);
                } while (!bool2);
                if (bool3) {
                  break label1274;
                }
              } while (bool3);
              if (!((ab)localObject3).isEmpty())
              {
                a(paramo, (ab)localObject3);
                localObject5 = ((ab)localObject3).l();
                do
                {
                  if (!((a.c.m)localObject5).e()) {
                    break;
                  }
                  paramn.a(((a.c.m)localObject5).a(), true);
                  ((a.c.m)localObject5).f();
                  if (bool3) {
                    break label1341;
                  }
                  if (bool2) {
                    break label1339;
                  }
                } while (!bool2);
              }
            } while (bool3);
            localy.g();
          }
        }
      }
      i1++;
    } while (!bool2);
    label277:
    label833:
    label1098:
    label1230:
    label1247:
    label1274:
    return;
  }
  
  private void l(a.f.o paramo)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    int i1 = 0;
    label180:
    label182:
    do
    {
      if (i1 >= this.I.length) {
        break;
      }
      bb localbb = this.I[i1];
      double d1 = c(paramo, localbb);
      int i2 = 0;
      a(paramo, localbb, true);
      double d2 = c(paramo, localbb);
      if (!bool2)
      {
        if (d2 < d1)
        {
          d1 = d2;
          i2 = 1;
        }
        if (bool2) {}
      }
      else if (!this.gb)
      {
        a(paramo, localbb, false);
        d2 = c(paramo, localbb);
        if (!bool2)
        {
          if (d2 < d1)
          {
            d1 = d2;
            i2 = 2;
          }
          a(paramo, localbb, true);
          d2 = c(paramo, localbb);
        }
        if (!bool2)
        {
          if (d2 < d1)
          {
            d1 = d2;
            i2 = 3;
          }
          a(paramo, localbb, false);
        }
        if (bool2) {
          break label182;
        }
        if (!bool1) {
          break label180;
        }
      }
      a(paramo, localbb, true);
      if (!bool2)
      {
        switch (i2)
        {
        case 0: 
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break;
          }
        case 1: 
          a(paramo, localbb, true);
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break;
          }
        case 2: 
          a(paramo, localbb, true);
          a(paramo, localbb, false);
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break;
          }
        case 3: 
          a(paramo, localbb, true);
          a(paramo, localbb, false);
          a(paramo, localbb, true);
          break;
        }
        i1++;
      }
    } while (!bool1);
  }
  
  private double c(a.f.o paramo, bb parambb)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    double d = 0.0D;
    ab localab = (ab)this.ab.get(parambb);
    a.c.m localm = localab.l();
    do
    {
      if (!localm.e()) {
        break;
      }
      a.c.d locald = localm.a();
      if (!bool2)
      {
        if (bool1) {
          break label93;
        }
        d += wc.a(paramo, locald.e(), locald.f());
        localm.f();
      }
    } while (!bool1);
    label93:
    return d;
  }
  
  private void a(a.f.o paramo, bb parambb, boolean paramBoolean)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    ab localab = (ab)this.bb.get(parambb);
    Rectangle2D localRectangle2D = wc.a(paramo, parambb.l());
    double d1 = 0.0D - localRectangle2D.getCenterX();
    double d2 = 0.0D - localRectangle2D.getCenterY();
    wc.b(paramo, parambb.l(), d1, d2);
    Object localObject2;
    a.d.y localy;
    ArrayList localArrayList;
    Object localObject3;
    a.d.w localw1;
    label245:
    a.d.w localw2;
    a.d.w localw3;
    a.d.w localw4;
    if (paramBoolean)
    {
      localObject1 = parambb.l();
      do
      {
        if (!((a.c.w)localObject1).e()) {
          break;
        }
        localObject2 = ((a.c.w)localObject1).d();
        paramo.a((a.c.e)localObject2, -paramo.m((a.c.e)localObject2), paramo.n((a.c.e)localObject2));
        ((a.c.w)localObject1).f();
      } while (!bool1);
      localObject1 = localab.l();
      do
      {
        do
        {
          if (!((a.c.m)localObject1).e()) {
            break;
          }
          localObject2 = ((a.c.m)localObject1).a();
          localy = paramo.l((a.c.d)localObject2);
          localArrayList = new ArrayList();
          if (bool1) {
            return;
          }
          localObject3 = localy.b();
          do
          {
            if (!((a.d.x)localObject3).e()) {
              break label245;
            }
            localw1 = ((a.d.x)localObject3).a();
            localArrayList.add(new a.d.w(-localw1.a(), localw1.b()));
            ((a.d.x)localObject3).f();
            if ((!bool2) && (bool1)) {
              break;
            }
          } while (!bool1);
          localObject3 = new a.d.y(localArrayList);
          paramo.b((a.c.d)localObject2, (a.d.y)localObject3);
          localw1 = paramo.p((a.c.d)localObject2);
          localw2 = new a.d.w(-localw1.a(), localw1.b());
          paramo.a((a.c.d)localObject2, localw2);
          localw3 = paramo.q((a.c.d)localObject2);
          localw4 = new a.d.w(-localw3.a(), localw3.b());
          paramo.b((a.c.d)localObject2, localw4);
          ((a.c.m)localObject1).f();
        } while (bool2);
      } while (!bool1);
    }
    Object localObject1 = parambb.l();
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.w)localObject1).d();
      paramo.a((a.c.e)localObject2, paramo.m((a.c.e)localObject2), -paramo.n((a.c.e)localObject2));
      ((a.c.w)localObject1).f();
    } while (!bool1);
    localObject1 = localab.l();
    label529:
    do
    {
      do
      {
        if (!((a.c.m)localObject1).e()) {
          break;
        }
        localObject2 = ((a.c.m)localObject1).a();
        localy = paramo.l((a.c.d)localObject2);
        localArrayList = new ArrayList();
        if (bool1) {
          return;
        }
        localObject3 = localy.b();
        do
        {
          if (!((a.d.x)localObject3).e()) {
            break label529;
          }
          localw1 = ((a.d.x)localObject3).a();
          localArrayList.add(new a.d.w(localw1.a(), -localw1.b()));
          ((a.d.x)localObject3).f();
          if ((!bool2) && (bool1)) {
            break;
          }
        } while (!bool1);
        localObject3 = new a.d.y(localArrayList);
        paramo.b((a.c.d)localObject2, (a.d.y)localObject3);
        localw1 = paramo.p((a.c.d)localObject2);
        localw2 = new a.d.w(localw1.a(), -localw1.b());
        paramo.a((a.c.d)localObject2, localw2);
        localw3 = paramo.q((a.c.d)localObject2);
        localw4 = new a.d.w(localw3.a(), -localw3.b());
        paramo.b((a.c.d)localObject2, localw4);
        ((a.c.m)localObject1).f();
      } while (bool2);
    } while (!bool1);
    d1 = localRectangle2D.getCenterX();
    d2 = localRectangle2D.getCenterY();
    if (!bool2) {
      wc.b(paramo, parambb.l(), d1, d2);
    }
  }
  
  private void a(a.c.x paramx)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    a.c.x localx = db.a();
    do
    {
      localObject = this.F.l();
      while (!bool1)
      {
        if (!((a.c.w)localObject).e()) {
          break;
        }
        localx.a(((a.c.w)localObject).d(), true);
        ((a.c.w)localObject).f();
      }
    } while (bool2);
    Object localObject = this.db.d(this.db.d());
    ((bb)localObject).j();
    a.c.w localw1 = ((bb)localObject).l();
    label217:
    label231:
    do
    {
      do
      {
        if (!localw1.e()) {
          return;
        }
        a.c.e locale1 = localw1.d();
        if (bool2) {
          break;
        }
        if (this.db.e(locale1))
        {
          a.c.w localw2 = this.db.c(locale1).l();
          do
          {
            if (!localw2.e()) {
              break label217;
            }
            a.c.e locale2 = localw2.d();
            if (bool1) {
              break;
            }
            if (!localx.getBool(locale2))
            {
              if (bool2) {
                continue;
              }
              if (!paramx.getBool(locale2)) {}
            }
            else
            {
              paramx.a(locale1, true);
              if (bool2) {
                break label231;
              }
              if (!bool1) {
                break label217;
              }
            }
            localw2.f();
          } while (!bool1);
        }
        localw1.f();
      } while (bool2);
    } while (!bool1);
  }
  
  private q a(a.f.o paramo, a.c.x paramx, bb parambb)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    q localq = new q();
    a.c.x localx = db.a();
    this.M = new bb();
    Object localObject1 = paramo.v();
    Object localObject3;
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      if (bool1) {
        break label177;
      }
      locale1 = ((a.c.w)localObject1).d();
      if (!bool2)
      {
        if (this.db.e(locale1))
        {
          a.c.e locale2 = localq.i();
          paramx.a(locale1, locale2);
          if (!bool2)
          {
            if (!this.cb.getBool(locale1)) {
              parambb.add(locale2);
            }
          }
          else {
            this.M.add(locale1);
          }
          localObject3 = localq.i();
          parambb.add(localObject3);
          localx.a(locale1, localObject3);
        }
        ((a.c.w)localObject1).f();
      }
    } while (!bool1);
    label177:
    localObject1 = localq.i();
    parambb.add(localObject1);
    a.c.e locale1 = localq.i();
    parambb.add(locale1);
    int i1 = 0;
    Object localObject4;
    a.c.e locale3;
    Object localObject5;
    Object localObject6;
    do
    {
      do
      {
        if (i1 >= this.I.length) {
          break;
        }
        localObject3 = this.I[i1];
        localObject4 = ((bb)localObject3).m();
        if (bool2) {
          break label386;
        }
        locale3 = this.db.b((a.c.e)localObject4);
        if (bool1) {
          break label385;
        }
        if (!bool2) {}
        localObject5 = locale3 != null ? (a.c.e)paramx.get(locale3) : localObject1;
        if ((bool2) || (this.db.e((a.c.e)localObject4)))
        {
          localObject6 = (a.c.e)paramx.get(localObject4);
          if (bool2) {
            continue;
          }
          if (!bool1) {}
        }
        else
        {
          localObject6 = localq.i();
          paramx.a(localObject4, localObject6);
        }
        localq.a((a.c.e)localObject5, (a.c.e)localObject6);
        i1++;
      } while (!bool1);
      if (bool2) {
        break label386;
      }
    } while (bool2);
    label385:
    label386:
    label444:
    label482:
    Object localObject7;
    if ((this.L) || ((bool2) || (this.fb.n())))
    {
      localObject2 = this.M.l();
      label676:
      do
      {
        do
        {
          if (!((a.c.w)localObject2).e()) {
            break;
          }
          break label444;
          localObject3 = ((a.c.w)localObject2).d();
          if (bool1) {
            break label682;
          }
          localObject4 = (a.c.e)paramx.get(localObject3);
          locale3 = this.db.b((a.c.e)localObject3);
          do
          {
            if (locale3 == null) {
              break label482;
            }
            if (bool1) {
              break;
            }
            if (!this.cb.getBool(locale3)) {
              break label482;
            }
            locale3 = this.db.b(locale3);
          } while (!bool1);
        } while (bool2);
        if (!bool2) {}
        localObject5 = locale3 != null ? (a.c.e)paramx.get(locale3) : localObject1;
        localq.a((a.c.e)localObject4, (a.c.e)localObject5);
        localObject6 = (z)this.X.get(localObject3);
        if (!bool2)
        {
          if (localObject6 != null) {
            do
            {
              a.c.e locale4;
              do
              {
                do
                {
                  if (((z)localObject6).isEmpty()) {
                    break;
                  }
                  localObject7 = (bb)((z)localObject6).b();
                  locale4 = ((bb)localObject7).m();
                  a.c.e locale5 = (a.c.e)paramx.get(locale4);
                  localq.a(locale5, (a.c.e)localObject5);
                } while (!this.cb.getBool(locale4));
                if ((bool2) || (bool1)) {
                  break;
                }
              } while (this.X.get(locale4) == null);
              ((z)localObject6).addAll((z)this.X.get(locale4));
              if (bool2) {
                break label676;
              }
            } while (!bool1);
          }
          ((a.c.w)localObject2).f();
        }
      } while (!bool1);
    }
    label682:
    Object localObject2 = db.a();
    a((a.c.x)localObject2);
    int i2 = 0;
    label824:
    do
    {
      do
      {
        if (i2 >= this.I.length) {
          break;
        }
        localObject4 = this.I[i2];
        locale3 = ((bb)localObject4).m();
        localObject5 = (a.c.e)paramx.get(locale3);
        localObject6 = this.db.b(locale3);
        if (bool1) {
          break label861;
        }
        if (!bool2) {}
        localObject7 = localObject6 != null ? (a.c.e)localx.get(localObject6) : locale1;
        if (!bool2)
        {
          if (((a.c.x)localObject2).getBool(locale3)) {
            localq.a((a.c.e)localObject5, (a.c.e)localObject7);
          }
        }
        else
        {
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break label824;
          }
        }
        localq.a((a.c.e)localObject7, (a.c.e)localObject5);
        i2++;
      } while (!bool1);
      if (bool2) {
        break label863;
      }
    } while (bool2);
    if (a.a.l.b(localq)) {
      throw new RuntimeException("constraint graph is cyclic!");
    }
    label861:
    label863:
    return localq;
  }
  
  private void m(a.f.o paramo)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    a.c.x localx = db.a();
    bb localbb1 = new bb();
    q localq = a(paramo, localx, localbb1);
    b_ localb_ = new b_(paramo, localq, localx, localbb1);
    int i1 = this.I.length;
    int i2 = 0;
    Object localObject2;
    do
    {
      if (i2 >= i1) {
        break;
      }
      localObject1 = this.I[i2];
      String str1 = (String)this.U.get(((bb)localObject1).m());
      localObject2 = (bb)this.V.get(str1);
      int i4 = a(((bb)localObject1).m(), paramo, (bb)localObject2);
      localb_.a(((bb)localObject1).m(), i4);
      i2++;
    } while (!bool1);
    ArrayList localArrayList = new ArrayList();
    Object localObject1 = new bb[i1];
    int i3 = 0;
    label466:
    do
    {
      if (!localb_.a())
      {
        localObject2 = localb_.c();
        bb localbb2 = (bb)this.Y.get(localObject2);
        localObject1[i3] = localbb2;
        i3++;
        a.c.w localw;
        a.c.e locale1;
        do
        {
          String str2 = (String)this.U.get(localObject2);
          localArrayList.add(str2);
          localw = localbb2.l();
          if (!localw.e()) {
            break;
          }
          locale1 = localw.d();
          if ((bool2) || (bool1)) {
            return;
          }
        } while (bool1);
        a.c.m localm = locale1.l();
        do
        {
          do
          {
            if (!localm.e()) {
              break label466;
            }
            a.c.d locald = localm.a();
            a.c.e locale2 = locald.a(locale1);
            String str3 = (String)this.U.get(locale2);
            bb localbb3 = (bb)this.Y.get(locale2);
            if (bool1) {
              break;
            }
            if (!str3.equals("remain"))
            {
              if (bool2) {
                continue;
              }
              if (!localArrayList.contains(str3))
              {
                if (bool2) {
                  continue;
                }
                if (localb_.a(localbb3.m()))
                {
                  bb localbb4 = (bb)this.V.get(str3);
                  localbb4.add(locale1);
                  ab localab = (ab)this.W.get(str3);
                  localab.add(locald);
                  int i5 = a(localbb3.m(), paramo, localbb4);
                  localb_.b(localbb3.m(), i5);
                }
              }
            }
            localm.f();
          } while (!bool1);
          localw.f();
        } while (bool2);
        if (!bool1) {
          break;
        }
      }
    } while (bool2);
    this.I = ((bb[])localObject1);
  }
  
  private int a(a.c.e parame, a.f.o paramo, bb parambb)
  {
    if (!wb) {}
    int i1 = this.sb == null ? 1 : this.sb.a(parame) + 2;
    return i1 * paramo.m() - parambb.size();
  }
  
  private a.d.w a(double paramDouble1, double paramDouble2, Rectangle2D paramRectangle2D, t paramt)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    t localt = new t(paramt.d() + paramRectangle2D.getWidth() / 2.0D, paramt.e() + paramRectangle2D.getHeight() / 2.0D, paramt.b() - paramRectangle2D.getWidth(), paramt.c() - paramRectangle2D.getHeight());
    double d1 = localt.d();
    double d2 = localt.e();
    double d3 = localt.b();
    double d4 = localt.c();
    if ((bool2) || (!localt.a(paramDouble1, paramDouble2)))
    {
      if (!bool2) {
        if (paramDouble1 <= d1)
        {
          if (!bool2) {
            if (paramDouble2 <= d2)
            {
              paramDouble1 = d1;
              paramDouble2 = d2;
              if ((!bool2) && (!bool1)) {
                break label409;
              }
            }
          }
          if (!bool2) {
            if (paramDouble2 <= d2 + d4)
            {
              paramDouble1 = d1;
              if ((!bool2) && (!bool1)) {
                break label409;
              }
            }
          }
          if (!bool2)
          {
            if (paramDouble2 <= d2 + d4) {
              break label409;
            }
            paramDouble1 = d1;
            paramDouble2 = d2 + d4;
          }
          if ((!bool2) && (!bool1)) {
            break label409;
          }
        }
      }
      if (!bool2) {
        if (paramDouble1 <= d1 + d3)
        {
          if (!bool2) {
            if (paramDouble2 <= d2)
            {
              paramDouble2 = d2;
              if ((!bool2) && (!bool1)) {
                break label409;
              }
            }
          }
          if ((!bool2) && (paramDouble2 <= d2 + d4)) {
            break label409;
          }
          if (!bool2)
          {
            if (paramDouble2 <= d2 + d4) {
              break label409;
            }
            paramDouble2 = d2 + d4;
          }
          if ((!bool2) && (!bool1)) {
            break label409;
          }
        }
      }
      if ((bool2) || (paramDouble1 > d1 + d3))
      {
        if (!bool2) {
          if (paramDouble2 <= d2)
          {
            paramDouble1 = d1 + d3;
            paramDouble2 = d2;
            if ((!bool2) && (!bool1)) {
              break label409;
            }
          }
        }
        if (!bool2) {
          if (paramDouble2 <= d2 + d4)
          {
            paramDouble1 = d1 + d3;
            if (!bool2) {
              if (!bool1) {
                break label409;
              }
            }
          }
          else
          {
            if (bool2) {
              break label407;
            }
          }
        }
        if (paramDouble2 > d2 + d4)
        {
          paramDouble1 = d1 + d3;
          label407:
          paramDouble2 = d2 + d4;
        }
      }
    }
    label409:
    return new a.d.w(paramDouble1, paramDouble2);
  }
  
  private static bb a(a.f.o paramo, bb parambb, a.c.x paramx)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    bb localbb1 = new bb();
    bb[] arrayOfbb = a.a.b.a(paramo, parambb);
    int i1 = 1;
    label116:
    do
    {
      if (i1 >= arrayOfbb.length) {
        break;
      }
      if (bool1) {
        break label130;
      }
      if (!localbb1.isEmpty()) {
        break;
      }
      bb localbb2 = arrayOfbb[i1];
      a.c.w localw = localbb2.l();
      do
      {
        do
        {
          if (!localw.e()) {
            break label116;
          }
          a.c.e locale = localw.d();
          if (bool1) {
            break;
          }
          if (paramx.getBool(locale)) {
            localbb1.add(locale);
          }
          localw.f();
        } while (!bool1);
        i1++;
      } while (bool2);
    } while (!bool1);
    label130:
    return localbb1;
  }
  
  private static ad a(a.c.d paramd, boolean paramBoolean, a.f.o paramo)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    k localk = paramBoolean ? paramo.c(ad.q) : paramo.c(ad.r);
    if (!bool2) {
      if (localk == null) {
        return null;
      }
    }
    Collection localCollection = (Collection)localk.get(paramd);
    if ((bool2) || (localCollection != null))
    {
      if (bool2) {
        break label84;
      }
      if (!localCollection.isEmpty()) {}
    }
    else
    {
      return null;
    }
    label84:
    Iterator localIterator = localCollection.iterator();
    Object localObject = (ad)localIterator.next();
    double d1 = ((ad)localObject).f();
    if (localIterator.hasNext()) {}
    label196:
    label236:
    label246:
    while (bool2)
    {
      ad localad = (ad)localIterator.next();
      double d2 = localad.f();
      if (bool1) {
        break label262;
      }
      if (d2 >= d1)
      {
        if (!bool2) {
          if (d2 == d1)
          {
            if (bool2) {
              break label196;
            }
            if (((ad)localObject).b())
            {
              if (bool2) {
                break label246;
              }
              if (!localad.b()) {
                break label236;
              }
            }
          }
        }
        if (((!bool2) && (d2 != d1)) || ((!bool2) && (((ad)localObject).a(255)))) {
          break;
        }
        if (bool2) {
          break label246;
        }
        if (!localad.a(255)) {
          break;
        }
      }
      localObject = localad;
      d1 = d2;
      if (!bool1) {
        break;
      }
    }
    if (((ad)localObject).a(255))
    {
      label262:
      if (bool2) {
        break label282;
      }
      if (!((ad)localObject).b()) {
        return null;
      }
    }
    label282:
    return localObject;
  }
  
  private static a.d.w b(a.c.d paramd, boolean paramBoolean, a.f.o paramo)
  {
    boolean bool = wb;
    a.c.e locale = paramBoolean ? paramd.e() : paramd.f();
    cd localcd = paramBoolean ? cd.d(paramo, paramd) : cd.e(paramo, paramd);
    if ((bool) || (localcd != null))
    {
      if (!bool) {
        if (localcd.a()) {
          return paramBoolean ? paramo.r(paramd) : paramo.s(paramd);
        }
      }
      if (!localcd.g())
      {
        localObject1 = paramo.v(locale);
        if (!bool) {
          if (localcd.c()) {
            return new a.d.w(((t)localObject1).d() + ((t)localObject1).b() * 0.5D, ((t)localObject1).e());
          }
        }
        if (!bool) {
          if (localcd.d()) {
            return new a.d.w(((t)localObject1).d() + ((t)localObject1).b() * 0.5D, ((t)localObject1).e() + ((t)localObject1).c());
          }
        }
        if (!bool) {
          if (localcd.f()) {
            return new a.d.w(((t)localObject1).d(), ((t)localObject1).e() + ((t)localObject1).c() * 0.5D);
          }
        }
        if (localcd.e()) {
          return new a.d.w(((t)localObject1).d() + ((t)localObject1).b(), ((t)localObject1).e() + ((t)localObject1).c() * 0.5D);
        }
      }
    }
    Object localObject1 = a(paramd, paramBoolean, paramo);
    if ((bool) || (localObject1 != null))
    {
      Object localObject2;
      if (!bool) {
        if (((ad)localObject1).b())
        {
          localObject2 = paramo.o(locale);
          return new a.d.w(((a.d.w)localObject2).a() + ((ad)localObject1).c(), ((a.d.w)localObject2).b() + ((ad)localObject1).d());
        }
      }
      if (!((ad)localObject1).a(255))
      {
        localObject2 = paramo.v(locale);
        if (!bool) {
          if (((ad)localObject1).a() == 1) {
            return new a.d.w(((t)localObject2).d() + ((t)localObject2).b() * 0.5D, ((t)localObject2).e());
          }
        }
        if (!bool) {
          if (((ad)localObject1).a() == 2) {
            return new a.d.w(((t)localObject2).d() + ((t)localObject2).b() * 0.5D, ((t)localObject2).e() + ((t)localObject2).c());
          }
        }
        if (!bool) {
          if (((ad)localObject1).a() == 8) {
            return new a.d.w(((t)localObject2).d(), ((t)localObject2).e() + ((t)localObject2).c() * 0.5D);
          }
        }
        if (((ad)localObject1).a() == 4) {
          return new a.d.w(((t)localObject2).d() + ((t)localObject2).b(), ((t)localObject2).e() + ((t)localObject2).c() * 0.5D);
        }
      }
    }
    return paramo.o(locale);
  }
  
  private a.d.w a(bb parambb, ab paramab, a.d.w paramw, a.f.o paramo)
  {
    boolean bool2 = vb;
    String str = (String)this.U.get(parambb.m());
    double d1 = 0.0D;
    double d2 = 0.0D;
    a.c.m localm = paramab.l();
    do
    {
      if (!localm.e()) {
        break;
      }
      a.c.d locald = localm.a();
      a.d.w localw1 = b(locald, true, paramo);
      a.d.w localw2 = b(locald, false, paramo);
      boolean bool1 = str.equals(this.U.get(locald.e()));
      if (bool2) {
        break label204;
      }
      double d3 = bool1 ? localw2.a - localw1.a : localw1.a - localw2.a;
      double d4 = bool1 ? localw2.b - localw1.b : localw1.b - localw2.b;
      d1 += paramw.a() + d3;
      d2 += paramw.b() + d4;
      localm.f();
    } while (!bool2);
    label204:
    int i1 = paramab.size();
    return new a.d.w(d1 / i1, d2 / i1);
  }
  
  private a.d.w a(a.f.o paramo, bb parambb1, a.c.x paramx1, bb parambb2, c paramc, boolean paramBoolean, a.c.x paramx2)
  {
    boolean bool3 = wb;
    boolean bool2 = vb;
    String str = (String)this.U.get(parambb2.m());
    bb localbb = (bb)this.V.get(str);
    Rectangle2D localRectangle2D = d(paramo, parambb2);
    a.d.w localw = new a.d.w(localRectangle2D.getCenterX(), localRectangle2D.getCenterY());
    double d1 = 0.0D;
    double d2 = 0.0D;
    Object localObject2;
    Object localObject3;
    label220:
    label222:
    Object localObject1;
    if (!bool3)
    {
      if (paramBoolean)
      {
        if (!bool3) {
          if (localbb.size() > 0)
          {
            boolean bool1 = this.cb.getBool(parambb2.m());
            if (bool1)
            {
              localObject2 = localbb.l();
              do
              {
                if (!((a.c.w)localObject2).e()) {
                  break;
                }
                localObject3 = ((a.c.w)localObject2).d();
                d1 += paramo.m((a.c.e)localObject3);
                d2 += paramo.n((a.c.e)localObject3);
                ((a.c.w)localObject2).f();
                if (bool3) {
                  break label222;
                }
                if (bool2) {
                  break label220;
                }
              } while (!bool2);
              d1 /= localbb.size();
              if (bool3) {
                break label464;
              }
              d2 /= localbb.size();
              if (!bool2) {
                break label466;
              }
            }
            localObject2 = (ab)this.W.get(str);
            localObject3 = a(parambb2, (ab)localObject2, localw, paramo);
            d1 = ((a.d.w)localObject3).a();
            d2 = ((a.d.w)localObject3).b();
            if (!bool2) {
              break label466;
            }
          }
        }
        localObject1 = a(paramo, parambb2, paramx1);
        if (!bool3) {
          if (((bb)localObject1).isEmpty())
          {
            d1 = (bool3) || (this.mb != null) ? this.mb.a : 0.0D;
            d2 = (bool3) || (this.mb != null) ? this.mb.b : 0.0D;
            if (!bool2) {
              break label466;
            }
          }
        }
        localObject2 = ((bb)localObject1).l();
        do
        {
          if (!((a.c.w)localObject2).e()) {
            break;
          }
          localObject3 = ((a.c.w)localObject2).d();
          d1 += paramo.m((a.c.e)localObject3);
          d2 += paramo.n((a.c.e)localObject3);
          ((a.c.w)localObject2).f();
          if (bool3) {
            break label449;
          }
          if (bool2) {
            break label447;
          }
        } while (!bool2);
        d1 /= ((bb)localObject1).size();
        if (bool3) {
          break label464;
        }
        d2 /= ((bb)localObject1).size();
        label447:
        label449:
        if (!bool2) {
          break label466;
        }
      }
      d1 = localRectangle2D.getCenterX();
    }
    label464:
    d2 = localRectangle2D.getCenterY();
    label466:
    if (((bool3) || (paramc != null)) && (paramc.a != null))
    {
      localObject1 = a(d1, d2, localRectangle2D, paramc.a);
      d1 = ((a.d.w)localObject1).a();
      d2 = ((a.d.w)localObject1).b();
    }
    if (!bool3)
    {
      if (this.gb)
      {
        localObject1 = new f();
        ((f)localObject1).a(this.ib);
        localObject2 = ((f)localObject1).a(paramo, parambb2, parambb1, paramx1, this.ab, new a.d.w(d1, d2), h(), paramc, this.cb, paramx2);
        this.Z.put(parambb2, localObject2);
        if (bool3) {
          break label945;
        }
        if (((SortedSet)localObject2).size() > 0)
        {
          localObject3 = (a.d.n)((SortedSet)localObject2).iterator().next();
          if (bool3) {
            break label945;
          }
          if (localObject3 != null)
          {
            d2 = ((a.d.n)localObject3).d().b();
            if (bool3) {
              break label945;
            }
            if ((paramc != null) && ((bool3) || (paramc.a != null)))
            {
              double d3 = paramc.a.e + localRectangle2D.getHeight() / 2.0D;
              double d4 = paramc.a.e + paramc.a.b - localRectangle2D.getHeight() / 2.0D;
              if (!bool3) {
                if (d3 > d2)
                {
                  d2 = d3;
                  if (bool3) {
                    break label945;
                  }
                  if (!bool2) {
                    break label930;
                  }
                }
              }
              if (!bool3)
              {
                if (d4 < d2)
                {
                  d2 = d4;
                  if (bool3) {
                    break label945;
                  }
                }
              }
              else if (!bool2) {}
            }
          }
        }
      }
      else
      {
        if (bool3) {
          break label946;
        }
      }
    }
    else if (h())
    {
      localObject1 = new d();
      localObject2 = new a.d.w(d1, d2);
      localObject3 = null;
      if (((!bool3) && (paramc == null)) || (paramc.a == null)) {
        localObject3 = new f.c_(-10000.0D, -10000.0D, 30000.0D, 30000.0D, (a.d.w)localObject2);
      } else {
        localObject3 = new f.c_(paramc.a.d(), paramc.a.e(), paramc.a.b(), paramc.a.c(), (a.d.w)localObject2);
      }
      SortedSet localSortedSet = ((d)localObject1).a(paramo, parambb1, parambb2, (f.c_)localObject3, (a.d.w)localObject2, false);
      this.Z.put(parambb2, localSortedSet);
    }
    label930:
    this.mb = new a.d.w(d1, d2);
    label945:
    label946:
    return this.mb;
  }
  
  private static double a(a.c.d paramd, a.f.o paramo)
  {
    boolean bool = wb;
    t localt1 = paramo.v(paramd.e());
    t localt2 = paramo.v(paramd.f());
    if (!bool)
    {
      if (localt1.e() + localt1.c() < localt2.e()) {
        return localt2.e() - localt1.e() + localt1.c();
      }
      if (bool) {}
    }
    else if (localt2.e() + localt2.c() < localt1.e())
    {
      return localt1.e() - localt2.e() + localt2.c();
    }
    return 0.0D;
  }
  
  protected void a(a.f.o paramo, ab paramab)
  {
    a(paramo, paramab.l());
  }
  
  protected void b(a.f.o paramo, ab paramab)
  {
    a(paramo, paramab.l());
  }
  
  private void a(a.f.o paramo, a.c.m paramm)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    a.c.n localn = paramo.C();
    String str;
    k localk;
    do
    {
      do
      {
        if (!paramm.e()) {
          break;
        }
        localn.a(paramm.a(), true);
        paramm.f();
      } while (!bool1);
      str = "y.layout.partial.PartialLayouter.ROUTE_EDGE_DPKEY";
      localk = paramo.c(str);
      paramo.a(str, localn);
    } while (bool2);
    if (!bool2) {
      if (this.lb)
      {
        n(paramo);
        if (bool2) {
          break label209;
        }
        if (!bool1) {
          break label203;
        }
      }
    }
    if (!bool2) {
      if (this.O == 0)
      {
        b(paramo, localn);
        if (bool2) {
          break label209;
        }
        if (!bool1) {
          break label203;
        }
      }
    }
    if (!bool2) {
      if (this.O == 1)
      {
        o(paramo);
        if (bool2) {
          break label209;
        }
        if (!bool1) {
          break label203;
        }
      }
    }
    if (!bool2) {
      if (this.O == 2)
      {
        a(paramo, localn);
        if (bool2) {
          break label209;
        }
      }
    }
    if ((bool1) && ((bool2) || (this.O == 3))) {
      b(paramo, localn);
    }
    label203:
    paramo.j(str);
    label209:
    if (!bool2)
    {
      if (localk != null) {
        paramo.a(str, localk);
      }
      paramo.a(localn);
    }
  }
  
  private static boolean a(a.f.o paramo, k paramk)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    int i1 = 0;
    int i2 = 0;
    int i3 = 0;
    a.c.m localm = paramo.w();
    label234:
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        a.c.d locald = localm.a();
        if (bool2) {
          break label296;
        }
        if (bool1) {
          break label295;
        }
        if ((bool2) || (paramk != null))
        {
          if (bool2) {
            continue;
          }
          if (!paramk.getBool(locald)) {}
        }
        else
        {
          i1++;
          a.d.y localy = paramo.n(locald);
          if (!bool2) {
            if (localy.j() == 2) {
              i3++;
            }
          }
          int i4 = 1;
          v localv = localy.l();
          do
          {
            if (!localv.e()) {
              break;
            }
            a.d.n localn = localv.a();
            double d1 = Math.abs(localn.k());
            double d2 = Math.abs(localn.l());
            if (bool1) {
              break label234;
            }
            if (d1 > 0.001D)
            {
              if (bool2) {
                continue;
              }
              if (d2 > 0.001D)
              {
                if (bool2) {
                  continue;
                }
                if (Math.abs(d1 - d2) > 0.001D)
                {
                  i4 = 0;
                  if (bool2) {
                    continue;
                  }
                  if (!bool1) {
                    break;
                  }
                }
              }
            }
            localv.f();
          } while (!bool1);
          if (bool2) {
            continue;
          }
          if (i4 != 0) {
            i2++;
          }
        }
        localm.f();
      } while (!bool1);
    } while (bool2);
    if (!bool2) {
      if (i2 != i1)
      {
        if (bool2) {
          break label298;
        }
        if (i2 <= i3) {
          break label297;
        }
        if (bool2) {
          break label298;
        }
        if (i2 <= 0.5D * i1) {
          break label297;
        }
      }
    }
    label295:
    label296:
    return true;
    label297:
    label298:
    return false;
  }
  
  private void a(a.f.o paramo, a.c.n paramn)
  {
    boolean bool2 = wb;
    rc localrc = this.kb;
    k localk1 = paramo.c(g);
    k localk2 = paramo.c(h);
    p local6 = new p()
    {
      private final k val$node2IsPartial;
      private final k val$edge2IsPartial;
      
      public boolean getBool(Object paramAnonymousObject)
      {
        boolean bool = a.wb;
        a.c.d locald = (a.c.d)paramAnonymousObject;
        if (!bool) {
          if (this.val$node2IsPartial != null)
          {
            if (bool) {
              break label91;
            }
            if (this.val$node2IsPartial.getBool(locald.e())) {
              break label90;
            }
            if (bool) {
              break label91;
            }
            if (this.val$node2IsPartial.getBool(locald.f())) {
              break label90;
            }
          }
        }
        if ((bool) || (this.val$edge2IsPartial != null))
        {
          if (bool) {
            break label91;
          }
          if (this.val$edge2IsPartial.getBool(locald)) {}
        }
        else
        {
          return true;
        }
        label90:
        label91:
        return false;
      }
    };
    boolean bool1 = wc.b(paramo, local6);
    Object localObject;
    if ((bool2) || ((bool1) || (a(paramo, local6))))
    {
      localObject = new a.f.l.a.a();
      ((a.f.l.a.a)localObject).b("y.layout.partial.PartialLayouter.ROUTE_EDGE_DPKEY");
      if (!bool2) {}
      ((a.f.l.a.a)localObject).a(!bool1);
      this.kb = ((rc)localObject);
      b(paramo, paramn);
      if (bool2) {
        return;
      }
      if (!vb) {}
    }
    else
    {
      localObject = new d_();
      ((d_)localObject).a("y.layout.partial.PartialLayouter.ROUTE_EDGE_DPKEY");
      this.kb = ((rc)localObject);
      o(paramo);
    }
    this.kb = localrc;
  }
  
  private void b(a.f.o paramo, a.c.n paramn)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    c(this.kb);
    k localk1 = paramo.c(ed.a);
    k localk2 = paramo.c(ed.b);
    if (!bool2)
    {
      if (this.gb)
      {
        a.c.x localx1 = db.a();
        a.c.x localx2 = db.a();
        paramo.a(ed.a, localx1);
        paramo.a(ed.b, localx2);
        a.c.m localm = paramo.w();
        label251:
        do
        {
          if (!localm.e()) {
            break;
          }
          a.c.d locald = localm.a();
          a.f.l.a.o localo = ((a.f.l.a.a)this.kb).c();
          double d = localo.a() + localo.b() + 5.0D;
          if (bool1) {
            break label293;
          }
          if (paramn.getBool(locald))
          {
            if (bool2) {
              continue;
            }
            if (a(locald, paramo) >= d)
            {
              if (!bool2)
              {
                if (paramo.n(locald.e()) < paramo.n(locald.f()))
                {
                  localx1.a(locald, cd.a((byte)2));
                  localx2.a(locald, cd.a((byte)1));
                }
              }
              else
              {
                if (bool2) {
                  continue;
                }
                if (!bool1) {
                  break label251;
                }
              }
              localx1.a(locald, cd.a((byte)1));
              localx2.a(locald, cd.a((byte)2));
            }
          }
          localm.f();
        } while (!bool1);
      }
      ((a.f.l.a.a)this.kb).a((byte)2);
      this.kb.doLayout(paramo);
    }
    if ((!bool2) && (this.gb))
    {
      label293:
      paramo.j(ed.a);
      if (!bool2)
      {
        if (localk1 != null) {
          paramo.a(ed.a, localk1);
        }
        if (!bool2) {
          paramo.j(ed.b);
        }
      }
      else if (localk2 == null)
      {
        return;
      }
      paramo.a(ed.b, localk2);
    }
  }
  
  private void n(a.f.o paramo)
  {
    c(this.kb);
    this.kb.doLayout(paramo);
  }
  
  private void o(a.f.o paramo)
  {
    c(this.kb);
    this.kb.doLayout(paramo);
  }
  
  private void b(a.f.o paramo, k paramk)
  {
    k localk = paramo.c(hb.B);
    paramo.a(hb.B, paramk);
    c(this.kb);
    this.kb.doLayout(paramo);
    if (!wb)
    {
      paramo.j(hb.B);
      if (localk == null) {}
    }
    else
    {
      paramo.a(hb.B, localk);
    }
  }
  
  protected void c(rc paramrc)
  {
    boolean bool = wb;
    if (!bool) {
      if (this.lb) {
        return;
      }
    }
    if ((bool) || ((paramrc instanceof a.f.l.a.a)))
    {
      a.f.l.a.a locala = (a.f.l.a.a)paramrc;
      locala.c(4.0D);
      if (!bool) {}
      locala.a(this.O == 4);
      a.f.l.a.o localo = locala.c();
      localo.c(5.0D);
      if (!bool) {}
      localo.a((byte)(this.gb ? 1 : 0));
    }
  }
  
  private Rectangle2D d(a.f.o paramo, bb parambb)
  {
    return wc.a(paramo, parambb.l());
  }
  
  private void a(a.f.o paramo, a.i.y paramy)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    k localk = paramo.c(kc.b);
    if (localk != null)
    {
      a.c.m localm = paramo.w();
      do
      {
        if (!localm.e()) {
          break;
        }
        a.c.d locald = localm.a();
        jc localjc1 = (jc)localk.get(locald.e());
        jc localjc2 = (jc)localk.get(locald.f());
        if (!bool2)
        {
          if ((localjc1 != null) && ((bool2) || (localjc2 != null)))
          {
            if (bool2) {
              continue;
            }
            if (!localjc1.equals(localjc2)) {
              paramy.a(locald);
            }
          }
          localm.f();
        }
      } while (!bool1);
    }
  }
  
  private void b(a.f.o paramo, a.i.y paramy)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    a.c.w localw = paramo.v();
    label89:
    label233:
    label254:
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      if (!bool2)
      {
        if (this.db.e(locale))
        {
          a.c.m localm = this.db.g(locale).l();
          a.c.d locald;
          do
          {
            do
            {
              if (!localm.e()) {
                break;
              }
              locald = localm.a();
              if (bool1) {
                break label233;
              }
              break label156;
              if (locald.c() != null) {
                paramy.a(locald);
              }
              localm.f();
            } while (!bool1);
          } while (bool2);
          localm = this.db.h(locale).l();
          do
          {
            do
            {
              if (!localm.e()) {
                break label187;
              }
              locald = localm.a();
              if (bool2) {
                break label89;
              }
              if (bool1) {
                break;
              }
              if (locald.c() != null) {
                paramy.a(locald);
              }
              localm.f();
            } while (!bool1);
          } while (bool2);
          localm = locale.l();
          do
          {
            if (!localm.e()) {
              break label254;
            }
            locald = localm.a();
            if (bool2) {
              break label163;
            }
            if (bool1) {
              break;
            }
            if (locald.c() != null) {
              paramy.a(locald);
            }
            localm.f();
          } while (!bool1);
        }
        localw.f();
      }
    } while (!bool1);
    label156:
    label163:
    label187:
    return;
  }
  
  private void a(a.f.o paramo, a.d.w paramw)
  {
    boolean bool = wb;
    if ((this.eb != null) && ((bool) || (paramw != null)))
    {
      a.d.w localw = paramo.o(this.eb);
      if ((bool) || ((localw.a() != paramw.a()) || ((bool) || (localw.b() != paramw.b()))))
      {
        double d1 = -(localw.a() - paramw.a());
        double d2 = -(localw.b() - paramw.b());
        wc.b(paramo, paramo.v(), d1, d2);
      }
    }
  }
  
  private static bb[] a(q paramq, bb parambb)
  {
    boolean bool2 = wb;
    boolean bool1 = vb;
    if (((!bool2) && (parambb == null)) || ((bool2) || (parambb.isEmpty()))) {
      return new bb[0];
    }
    a.c.x localx = paramq.B();
    a.a.n.a(paramq, localx, false, 1, paramq.k(), null);
    a.c.e[] arrayOfe = parambb.p();
    Arrays.sort(arrayOfe, a.i.l.e(localx));
    int i1 = localx.getInt(arrayOfe[0]);
    int i2 = 0;
    int i3 = 0;
    do
    {
      do
      {
        if (i3 >= arrayOfe.length) {
          break;
        }
        a.c.e locale1 = arrayOfe[i3];
        int i5 = localx.getInt(locale1);
        if (bool2) {
          break label158;
        }
        if (bool1) {
          break label157;
        }
        if (i5 != i1)
        {
          i1 = i5;
          i2++;
        }
        localx.a(locale1, i2);
        i3++;
      } while (!bool1);
    } while (bool2);
    label157:
    label158:
    bb[] arrayOfbb = new bb[i2 + 1];
    int i4 = 0;
    do
    {
      do
      {
        if (i4 >= arrayOfbb.length) {
          break;
        }
        arrayOfbb[i4] = new bb();
        i4++;
        if (bool2) {
          break label214;
        }
        if (bool1) {
          break label212;
        }
      } while (!bool1);
    } while (bool2);
    i4 = 0;
    label212:
    label214:
    do
    {
      if (i4 >= arrayOfe.length) {
        break;
      }
      a.c.e locale2 = arrayOfe[i4];
      if (bool2) {
        break label272;
      }
      arrayOfbb[localx.getInt(locale2)].add(locale2);
      i4++;
      if (bool1) {
        break label270;
      }
    } while (!bool1);
    if (!bool2) {
      paramq.a(localx);
    }
    label270:
    label272:
    return arrayOfbb;
  }
  
  public static class d_
    implements rc
  {
    Object e = rc.d;
    public static int f;
    
    public Object a()
    {
      return this.e;
    }
    
    public void a(Object paramObject)
    {
      if (paramObject == null) {
        throw new IllegalArgumentException("null");
      }
      this.e = paramObject;
    }
    
    public boolean canLayout(a.f.o paramo)
    {
      return true;
    }
    
    public void doLayout(a.f.o paramo)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      k localk = paramo.c(a());
      a.c.m localm = paramo.w();
      do
      {
        if (!localm.e()) {
          break;
        }
        a.c.d locald = localm.a();
        if ((bool2) || (localk != null))
        {
          if (bool2) {
            continue;
          }
          if (!localk.getBool(locald)) {}
        }
        else
        {
          wc.b(paramo, locald);
        }
        localm.f();
      } while (!bool1);
    }
  }
  
  static class b_
    implements a.i.a.m
  {
    private a.f.o a;
    private q b;
    private bb c;
    private a.c.x d;
    private a.c.x e;
    private bb f;
    
    b_(a.f.o paramo, q paramq, a.c.x paramx, bb parambb)
    {
      this.a = paramo;
      this.b = paramq;
      this.e = paramx;
      this.c = new bb();
      this.d = db.a();
      this.f = parambb;
      parambb.a(new a.c_(paramq));
    }
    
    public boolean a()
    {
      return this.c.isEmpty();
    }
    
    public boolean a(a.c.e parame)
    {
      return this.c.contains(parame);
    }
    
    public void a(a.c.e parame, int paramInt)
    {
      this.c.add(parame);
      this.d.a(parame, paramInt);
    }
    
    public a.c.e b()
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      if (!bool2) {
        if (a()) {
          return null;
        }
      }
      a.c.w localw1 = this.f.l();
      do
      {
        if (!localw1.e()) {
          break;
        }
        localObject = localw1.d();
        if (bool1) {
          break label90;
        }
        if (((a.c.e)localObject).d() == 0)
        {
          this.f.b(localw1);
          this.b.a((a.c.e)localObject);
        }
        localw1.f();
      } while (!bool1);
      label90:
      int i = 2147483647;
      Object localObject = null;
      double d1 = 0.0D;
      a.c.w localw2 = this.c.l();
      label234:
      do
      {
        if (!localw2.e()) {
          break;
        }
        a.c.e locale1 = localw2.d();
        double d2 = this.a.s(locale1) * this.a.t(locale1);
        int j = b(locale1);
        a.c.e locale2 = (a.c.e)this.e.get(locale1);
        if (bool1) {
          break label252;
        }
        if (locale2 != null)
        {
          if (bool2) {
            continue;
          }
          if (locale2.d() != 0) {}
        }
        else
        {
          if (!bool2) {
            if (i <= j)
            {
              if (bool2) {
                continue;
              }
              if (i != j) {
                break label234;
              }
              if (bool2) {
                continue;
              }
              if (d2 <= d1) {
                break label234;
              }
            }
          }
          i = j;
          localObject = locale1;
          d1 = d2;
        }
        localw2.f();
      } while (!bool1);
      if ((!bool2) && (localObject == null)) {
        label252:
        throw new RuntimeException("Found no valid element!");
      }
      return localObject;
    }
    
    public a.c.e c()
    {
      a.c.e locale1 = b();
      this.c.remove(locale1);
      a.c.e locale2 = (a.c.e)this.e.get(locale1);
      this.b.a(locale2);
      return locale1;
    }
    
    public void b(a.c.e parame, int paramInt)
    {
      this.d.a(parame, paramInt);
    }
    
    public void d()
    {
      this.c.clear();
      this.d = db.a();
    }
    
    public int b(a.c.e parame)
    {
      return this.d.getInt(parame);
    }
    
    public void e()
    {
      d();
    }
  }
  
  static class c_
    implements Comparator
  {
    int[] a;
    
    c_(q paramq)
    {
      if (!a.wb)
      {
        if (a.a.l.b(paramq)) {
          throw new RuntimeException("Found cycle in constraint graph!");
        }
        this.a = new int[paramq.j()];
      }
      a.a.x.a(paramq, this.a);
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      a.c.e locale1 = (a.c.e)paramObject1;
      a.c.e locale2 = (a.c.e)paramObject2;
      return a.i.l.a(this.a[locale1.f()], this.a[locale2.f()]);
    }
  }
  
  class h_
    extends p
  {
    private a.c.x c;
    private k d;
    
    h_(a.c.e parame, k paramk)
    {
      this.d = paramk;
      this.c = db.a();
      a.c.w localw = a.this.db.d(parame).l();
      do
      {
        if (!localw.e()) {
          break;
        }
        a.c.e locale = localw.d();
        this.c.a(locale, true);
        localw.f();
      } while (!bool);
    }
    
    public boolean getBool(Object paramObject)
    {
      boolean bool = a.wb;
      if ((bool) || (this.d.getBool(paramObject))) {
        if (bool) {}
      }
      return !this.c.getBool(paramObject);
    }
  }
  
  private class a_
  {
    private final Object a;
    private final Object c;
    
    private a_(Object paramObject1, Object paramObject2)
    {
      this.a = paramObject1;
      this.c = paramObject2;
    }
    
    public boolean equals(Object paramObject)
    {
      boolean bool = a.wb;
      if (!bool) {
        if (this == paramObject) {
          return true;
        }
      }
      if (paramObject != null)
      {
        if (bool) {
          break label37;
        }
        if (getClass() == paramObject.getClass()) {}
      }
      else
      {
        return false;
      }
      label37:
      a_ locala_ = (a_)paramObject;
      if (!bool) {
        if (this.c != null)
        {
          if (bool) {
            break label90;
          }
          if (this.c.equals(locala_.c)) {
            break label86;
          }
          break label84;
        }
      }
      if (!bool) {
        if (locala_.c != null) {
          label84:
          return false;
        }
      }
      label86:
      label90:
      if ((bool) || ((this.a == null) || (!bool))) {
        if ((!this.a.equals(locala_.a)) && ((goto 125) || (locala_.a != null))) {
          return false;
        }
      }
      return true;
    }
    
    public int hashCode()
    {
      boolean bool = a.wb;
      int i = (bool) || (this.a != null) ? this.a.hashCode() : 0;
      i = 31 * i + ((bool) || (this.c != null) ? this.c.hashCode() : 0);
      return i;
    }
    
    a_(Object paramObject1, Object paramObject2, a.4 param4)
    {
      this(paramObject1, paramObject2);
    }
  }
}
// INTERNAL ERROR //


/* Location:           E:\idea\

 * Qualified Name:     a.f.i.a

 * JD-Core Version:    0.7.0.1

 */